From c60321945002035c7ccfd786a37884c2caace30a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Pedersen?= Date: Fri, 27 Dec 2024 12:42:40 +0100 Subject: [PATCH] Fix pid path and user for docker file actions Change-Id: I5f4e45ab694e7aa8fdefaf66911b49e74deb1403 --- Dockerfile | 4 +++- scripts/nginx.conf | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index aa88633fa..3f0a03cd8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,9 @@ COPY . /frontend/ RUN npx ng build FROM nginxinc/nginx-unprivileged +USER root RUN rm -rf /usr/share/nginx/html/* -COPY --from=builder /frontend/dist/ /usr/share/nginx/html/ COPY scripts/nginx.conf /etc/nginx/nginx.conf +USER 101 +COPY --from=builder /frontend/dist/ /usr/share/nginx/html/ EXPOSE 8080 diff --git a/scripts/nginx.conf b/scripts/nginx.conf index a52262e1f..fdac68dc6 100644 --- a/scripts/nginx.conf +++ b/scripts/nginx.conf @@ -5,7 +5,7 @@ user nginx; worker_processes auto; error_log /var/log/nginx/error.log; -pid /run/nginx.pid; +pid /tmp/nginx.pid; # Load dynamic modules. See /usr/share/doc/nginx/README.dynamic. include /usr/share/nginx/modules/*.conf;