diff --git a/Dockerfile.prod b/Dockerfile.prod index 228df166..3abd2ca7 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -9,7 +9,9 @@ COPY . /app/ RUN yarn build # => Run container -FROM nginx:1.15.2-alpine +# FROM nginx:1.15.2-alpine +ARG registry=docker.io +FROM ${registry}/nginxinc/nginx-unprivileged:stable # Nginx config RUN rm -rf /etc/nginx/conf.d @@ -31,9 +33,5 @@ RUN apk add --no-cache bash # Make our shell script executable RUN chmod +x env.sh -# change to non-root user -USER node -RUN chown -R node:node /usr/share/nginx/html - # Start Nginx server CMD ["/bin/bash", "-c", "/usr/share/nginx/html/env.sh && nginx -g \"daemon off;\""] \ No newline at end of file