Skip to content

Commit

Permalink
[Dockerfile] Switch node base image
Browse files Browse the repository at this point in the history
  • Loading branch information
meissadia committed Dec 16, 2024
1 parent 5d7937b commit 51ecb5d
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 51ecb5d

Please sign in to comment.