feat: Run piped frontend with unprivileged user

This commit is contained in:
Bernd Schorgers 2025-01-14 18:25:47 +01:00 committed by Bnyro
parent a97c355460
commit 1b5a362b08
2 changed files with 6 additions and 6 deletions

View File

@ -15,11 +15,11 @@ RUN --mount=type=cache,target=/root/.local/share/pnpm \
pnpm install --prefer-offline && \ pnpm install --prefer-offline && \
pnpm build && ./localizefonts.sh 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 COPY docker/entrypoint.sh /entrypoint.sh

View File

@ -1,7 +1,7 @@
FROM nginx:alpine FROM nginxinc/nginx-unprivileged:alpine
COPY ./dist-ci/ /usr/share/nginx/html/ COPY --chown=101:101 ./dist-ci/ /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 COPY docker/entrypoint.sh /entrypoint.sh
EXPOSE 80 EXPOSE 80