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

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


The following commit(s) were added to refs/heads/main by this push:
     new 34e63e6  Console: Update docker image to redhat UBI images (#129)
34e63e6 is described below

commit 34e63e682b41b4ff9566c5db803d30e9fa73e15f
Author: Vignesh Nayak Manel <[email protected]>
AuthorDate: Mon Jan 12 07:44:24 2026 +0530

    Console: Update docker image to redhat UBI images (#129)
    
    * Update docker image to redhat ubi images
    
    * Added license
    
    * Updated as per review comments
    
    * remove global config
---
 console/docker/Dockerfile         | 11 +++++------
 console/docker/generate-config.sh |  6 +++---
 console/docker/nginx.conf         |  2 +-
 3 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/console/docker/Dockerfile b/console/docker/Dockerfile
index 1cae9f8..179e41c 100644
--- a/console/docker/Dockerfile
+++ b/console/docker/Dockerfile
@@ -16,7 +16,7 @@
 # under the License.
 
 # Build stage
-FROM node:22.12.0-alpine AS builder
+FROM registry.access.redhat.com/ubi9/nodejs-22-minimal:9.7-1767673763 AS 
builder
 
 # Default environment variables (can be overridden at runtime)
 ENV VITE_POLARIS_API_URL=http://polaris:8181
@@ -39,7 +39,7 @@ COPY . .
 RUN npm run build
 
 # Production stage
-FROM nginx:alpine
+FROM registry.access.redhat.com/ubi9/nginx-126:9.7-1767846422
 
 # Copy DISCLAIMER, LICENSE, NOTICE files
 COPY DISCLAIMER /DISCLAIMER
@@ -47,14 +47,13 @@ COPY LICENSE-BUNDLE /LICENSE
 COPY NOTICE /NOTICE
 
 # Copy custom nginx configuration as template
-COPY docker/nginx.conf /etc/nginx/conf.d/default.conf.template
+COPY docker/nginx.conf /opt/app-root/etc/nginx.d/default.conf.template
 
 # Copy runtime config generation script
-COPY docker/generate-config.sh /generate-config.sh
-RUN chmod +x /generate-config.sh
+COPY --chmod=755 docker/generate-config.sh /generate-config.sh
 
 # Copy built application from builder stage
-COPY --from=builder /app/dist /usr/share/nginx/html
+COPY --from=builder /app/dist /opt/app-root/src
 
 # Expose port 80
 EXPOSE 80
diff --git a/console/docker/generate-config.sh 
b/console/docker/generate-config.sh
index 6494fea..2387e1a 100644
--- a/console/docker/generate-config.sh
+++ b/console/docker/generate-config.sh
@@ -17,12 +17,12 @@
 # under the License.
 
 # Generate nginx configuration with the backend URL
-envsubst '${VITE_POLARIS_API_URL}' < /etc/nginx/conf.d/default.conf.template > 
/etc/nginx/conf.d/default.conf
+envsubst '${VITE_POLARIS_API_URL}' < 
/opt/app-root/etc/nginx.d/default.conf.template > 
/opt/app-root/etc/nginx.d/default.conf
 
 echo "Generated nginx config with backend: ${VITE_POLARIS_API_URL}"
 
 # Generate runtime configuration from environment variables
-cat > /usr/share/nginx/html/config.js << EOF
+cat > /opt/app-root/src/config.js << EOF
 // Runtime configuration generated from environment variables
 window.APP_CONFIG = {
   VITE_POLARIS_API_URL: '${VITE_POLARIS_API_URL}',
@@ -33,7 +33,7 @@ window.APP_CONFIG = {
 EOF
 
 echo "Generated config.js with runtime configuration:"
-cat /usr/share/nginx/html/config.js
+cat /opt/app-root/src/config.js
 
 # Start nginx
 exec nginx -g 'daemon off;'
diff --git a/console/docker/nginx.conf b/console/docker/nginx.conf
index ff9da4a..dffe1c7 100644
--- a/console/docker/nginx.conf
+++ b/console/docker/nginx.conf
@@ -18,7 +18,7 @@
 server {
     listen 80;
     server_name localhost;
-    root /usr/share/nginx/html;
+    root /opt/app-root/src;
     index index.html;
 
     # Gzip compression

Reply via email to