This is an automated email from the ASF dual-hosted git repository.

yufei pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git


The following commit(s) were added to refs/heads/main by this push:
     new 3396e22  Add eclipseLinkDeps options for Dockerfile and run.sh (#313)
3396e22 is described below

commit 3396e221358cc860fa3b60a5678d2fcab5334efc
Author: MonkeyCanCode <[email protected]>
AuthorDate: Tue Sep 24 15:43:05 2024 -0500

    Add eclipseLinkDeps options for Dockerfile and run.sh (#313)
---
 Dockerfile | 2 +-
 README.md  | 8 +++++++-
 run.sh     | 8 ++++----
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 4afed55..cf1c3e8 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -20,7 +20,7 @@
 # Base Image
 # Use a non-docker-io registry, because pulling images from docker.io is
 # subject to aggressive request rate limiting and bandwidth shaping.
-FROM registry.access.redhat.com/ubi9/openjdk-21:1.20-2.1726695192 as build
+FROM registry.access.redhat.com/ubi9/openjdk-21:1.20-2.1726695192 AS build
 ARG ECLIPSELINK=false
 ARG ECLIPSELINK_DEPS
 
diff --git a/README.md b/README.md
index 0168324..f0f7ffb 100644
--- a/README.md
+++ b/README.md
@@ -62,15 +62,21 @@ select * from db1.table1;
 
 Apache Polaris supports the following optional build options:
 - `-PeclipseLink=true` – Enables the EclipseLink extension.
-- `-PeclipseLinkDeps=[groupId]:[artifactId]:[version],...` – Specifies one or 
more additional dependencies for EclipseLink (e.g., JDBC drivers), separated by 
commas.
+- `-PeclipseLinkDeps=[groupId]:[artifactId]:[version],...` – Specifies one or 
more additional dependencies for EclipseLink (e.g., JDBC drivers) separated by 
commas.
 
 ### More build and run options
 Running in Docker
 - `docker build -t localhost:5001/polaris:latest .` - To build the image.
+  - Optional build options:
+    - `docker build -t localhost:5001/polaris:latest --build-arg 
ECLIPSELINK=true .` - Enables the EclipseLink extension.
+    - `docker build -t localhost:5001/polaris:latest --build-arg 
ECLIPSELINK=true --build-arg 
ECLIPSELINK_DEPS=[groupId]:[artifactId]:[version],... .` – Enables the 
EclipseLink extension with one or more additional dependencies for EclipseLink 
(e.g. JDBC drivers) separated by commas.
 - `docker run -p 8181:8181 localhost:5001/polaris:latest` - To run the image 
in standalone mode.
 
 Running in Kubernetes
 - `./run.sh` - To run Polaris as a mini-deployment locally. This will create 
one pod that bind itself to ports `8181` and `8182`.
+  - Optional run options:
+    - `./run.sh -b "ECLIPSELINK=true"` - Enables the EclipseLink extension.
+    - `./run.sh -b 
"ECLIPSELINK=true;ECLIPSELINK_DEPS=[groupId]:[artifactId]:[version],..."` – 
Enables the EclipseLink extension with one or more additional dependencies for 
EclipseLink (e.g. JDBC drivers) separated by commas.
 - `kubectl port-forward svc/polaris-service -n polaris 8181:8181 8182:8182` - 
To create secure connections between a local machine and a pod within the 
cluster for both service and metrics endpoints.
   - Currently supported metrics endpoints:
     - localhost:8182/metrics
diff --git a/run.sh b/run.sh
index c56e9de..5947b89 100755
--- a/run.sh
+++ b/run.sh
@@ -26,8 +26,8 @@ BUILD_ARGS=""  # Initialize an empty string to store Docker 
build arguments
 
 # Function to display usage information
 usage() {
-  echo "Usage: $0 [-b build-arg1=value1,build-arg2=value2,...] [-h]"
-  echo "  -b    Pass a set of arbitrary build arguments to docker build, 
separated by commas"
+  echo "Usage: $0 [-b build-arg1=value1;build-arg2=value2;...] [-h]"
+  echo "  -b    Pass a set of arbitrary build arguments to docker build, 
separated by semicolons"
   echo "  -h    Display this help message"
   exit 1
 }
@@ -36,7 +36,7 @@ usage() {
 while getopts "b:h" opt; do
   case ${opt} in
     b)
-      IFS=',' read -ra ARGS <<< "${OPTARG}"  # Split the comma-separated list 
into an array
+      IFS=';' read -ra ARGS <<< "${OPTARG}"  # Split the semicolon-separated 
list into an array
       for arg in "${ARGS[@]}"; do
         BUILD_ARGS+=" --build-arg ${arg}"  # Append each build argument to the 
list
       done
@@ -59,7 +59,7 @@ sh ./kind-registry.sh
 
 # Check if BUILD_ARGS is not empty and print the build arguments
 if [[ -n "$BUILD_ARGS" ]]; then
-  echo "Building polaris image with build arguments: $BUILD_ARGS"
+  echo "Building polaris image with build arguments:$BUILD_ARGS"
 else
   echo "Building polaris image without any additional build arguments."
 fi

Reply via email to