use unprivileged nginx container

This commit is contained in:
sid palas
2023-02-10 11:01:26 -05:00
parent 9001f31036
commit c8aba89374
3 changed files with 3 additions and 2 deletions

View File

@ -1,3 +1,4 @@
# Pin specific version
FROM node:19.4-bullseye
COPY . .

View File

@ -17,7 +17,7 @@ COPY . .
RUN npm run build
# Use separate stage for deployable image
FROM nginx:1.23-alpine
FROM nginxinc/nginx-unprivileged:1.23-alpine-perl
COPY nginx.conf /etc/nginx/conf.d/default.conf

View File

@ -19,7 +19,7 @@ COPY . .
RUN npm run build
# Use separate stage for deployable image
FROM nginx:1.23-alpine
FROM nginxinc/nginx-unprivileged:1.23-alpine-perl
# Use COPY --link to avoid breaking cache if we change the second stage base image
COPY --link nginx.conf /etc/nginx/conf.d/default.conf