use unprivileged nginx container
This commit is contained in:
@ -1,3 +1,4 @@
|
|||||||
|
# Pin specific version
|
||||||
FROM node:19.4-bullseye
|
FROM node:19.4-bullseye
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|||||||
@ -17,7 +17,7 @@ COPY . .
|
|||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Use separate stage for deployable image
|
# 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
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,7 @@ COPY . .
|
|||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Use separate stage for deployable image
|
# 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
|
# 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
|
COPY --link nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|||||||
Reference in New Issue
Block a user