From 51ecb5dfb155560fc705c3b2f41706e11afd1ea2 Mon Sep 17 00:00:00 2001 From: Meis Date: Mon, 16 Dec 2024 12:51:54 -0700 Subject: [PATCH] [Dockerfile] Switch node base image --- Dockerfile | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3d625a90f..222a7d172 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/cfpb/regtech/sbl/node-js-alpine:3.20 as build-stage +FROM ghcr.io/cfpb/regtech/sbl/nodejs-alpine:3.20 as build-stage WORKDIR /usr/src/app ARG DOCKER_TAG="latest" @@ -30,32 +30,32 @@ COPY --from=build-stage /usr/src/app/dist /usr/share/nginx/html # copy necessary import-meta-env-alpine files for env var injection COPY --from=build-stage \ - /usr/src/app/import-meta-env-alpine \ - /usr/src/app/nginx-entrypoint.sh \ - /usr/src/app/.env.example.public \ - /usr/share/nginx/html/ + /usr/src/app/import-meta-env-alpine \ + /usr/src/app/nginx-entrypoint.sh \ + /usr/src/app/.env.example.public \ + /usr/share/nginx/html/ # copy nginx configuration into template folder for env var injection COPY nginx/nginx.conf /etc/nginx/templates/nginx.conf.template - + # Security Basline - Meets requirement 9 RUN find /etc/nginx -type d | xargs chmod 750 && \ - find /etc/nginx -type f | xargs chmod 640 + find /etc/nginx -type f | xargs chmod 640 # Security Basline - The `sed` was added to meet requirement 17 RUN sed -i '/Faithfully yours/d' /usr/share/nginx/html/50x.html && \ - addgroup -S $NGINX_USER && \ - adduser -S $NGINX_USER -G $NGINX_USER && \ - # We need to come back and reconcile the multiple pids. - touch /run/nginx.pid && \ - touch /var/run/nginx.pid && \ - touch /var/run/nginx.pid && \ - chown -R $NGINX_USER:$NGINX_USER \ - /etc/nginx \ - /run/nginx.pid \ - /var/cache/nginx/ \ - /var/run/nginx.pid \ - /usr/share/nginx/html + addgroup -S $NGINX_USER && \ + adduser -S $NGINX_USER -G $NGINX_USER && \ + # We need to come back and reconcile the multiple pids. + touch /run/nginx.pid && \ + touch /var/run/nginx.pid && \ + touch /var/run/nginx.pid && \ + chown -R $NGINX_USER:$NGINX_USER \ + /etc/nginx \ + /run/nginx.pid \ + /var/cache/nginx/ \ + /var/run/nginx.pid \ + /usr/share/nginx/html EXPOSE 8080 USER svc_nginx_sbl