MonkeyCanCode commented on code in PR #129: URL: https://github.com/apache/polaris-tools/pull/129#discussion_r2679043141
########## console/docker/Dockerfile: ########## @@ -39,23 +39,34 @@ COPY . . RUN npm run build # Production stage -FROM nginx:alpine +FROM registry.access.redhat.com/ubi9/nginx-126:latest + +# Switch to root to configure the image +USER 0 # Copy DISCLAIMER, LICENSE, NOTICE files COPY DISCLAIMER /DISCLAIMER COPY LICENSE-BUNDLE /LICENSE COPY NOTICE /NOTICE +# Override Global Nginx Config +COPY docker/nginx-global.conf /etc/nginx/nginx.conf + # Copy custom nginx configuration as template COPY docker/nginx.conf /etc/nginx/conf.d/default.conf.template Review Comment: UBI nginx image uses non-standard path compared to upstream nginx image. I think the right place to put nginx config is under `/opt/app-root/etc/nginx.d` which is accessible to the user default (1001). This will remove the unnecessary global config and user switch commands. ########## 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-20-minimal:latest AS builder Review Comment: Should we stick with nodejs22 as well as the source is using that version (which in this case, we will switch to `registry.access.redhat.com/ubi9/nodejs-22-minimal:9.7-1767673763`. It is usually not ideal to use `latest` as people can be building with diff image tag when running from local. Once we have renovate bot in CI to keep dependencies up to date, this will then get auto updated. WDYT? ########## console/docker/Dockerfile: ########## @@ -39,23 +39,34 @@ COPY . . RUN npm run build # Production stage -FROM nginx:alpine +FROM registry.access.redhat.com/ubi9/nginx-126:latest Review Comment: Same here for the latest tag. Latest tag us `9.7-1767846422` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
