Skip to content

Commit

Permalink
feat: Run piped frontend with unprivileged user
Browse files Browse the repository at this point in the history
  • Loading branch information
bjw-s authored and Bnyro committed Jan 14, 2025
1 parent a97c355 commit 1b5a362
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.ci
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 1b5a362

Please sign in to comment.