Skip to content

Commit

Permalink
Make frontend image rootless
Browse files Browse the repository at this point in the history
  • Loading branch information
thomashbrnrd committed Sep 4, 2023
1 parent db75e84 commit fa2d000
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ FROM base as build
# RUN npm ci --production
RUN npm run build

FROM nginx:1.21.4-alpine as prod
FROM nginxinc/nginx-unprivileged:1.21.4-alpine as prod

COPY nginx.conf /etc/nginx/nginx.conf

Expand Down
3 changes: 3 additions & 0 deletions frontend/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ worker_processes 4;

events { worker_connections 1024; }

# Directive to run nginx as non-root user
pid /tmp/nginx.pid;

http {
server {
listen 8080;
Expand Down

0 comments on commit fa2d000

Please sign in to comment.