From 1b5a362b0843c670f808f600aa87433fc7f55d15 Mon Sep 17 00:00:00 2001 From: Bernd Schorgers Date: Tue, 14 Jan 2025 18:25:47 +0100 Subject: [PATCH] feat: Run piped frontend with unprivileged user --- Dockerfile | 6 +++--- Dockerfile.ci | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index ac4f6c69..8115599c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,11 +15,11 @@ RUN --mount=type=cache,target=/root/.local/share/pnpm \ pnpm install --prefer-offline && \ pnpm build && ./localizefonts.sh -FROM nginx:alpine +FROM nginxinc/nginx-unprivileged:alpine -COPY --from=build /app/dist/ /usr/share/nginx/html/ +COPY --chown=101:101 --from=build /app/dist/ /usr/share/nginx/html/ -COPY docker/nginx.conf /etc/nginx/conf.d/default.conf +COPY --chown=101:101 docker/nginx.conf /etc/nginx/conf.d/default.conf COPY docker/entrypoint.sh /entrypoint.sh diff --git a/Dockerfile.ci b/Dockerfile.ci index 59020fd6..4694f8f4 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -1,7 +1,7 @@ -FROM nginx:alpine +FROM nginxinc/nginx-unprivileged:alpine -COPY ./dist-ci/ /usr/share/nginx/html/ -COPY docker/nginx.conf /etc/nginx/conf.d/default.conf +COPY --chown=101:101 ./dist-ci/ /usr/share/nginx/html/ +COPY --chown=101:101 docker/nginx.conf /etc/nginx/conf.d/default.conf COPY docker/entrypoint.sh /entrypoint.sh EXPOSE 80