Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ COPY . /src
RUN yarn build --base=$BASE_PATH

# App
FROM nginx:stable-alpine
FROM nginxinc/nginx-unprivileged:stable-alpine

COPY --from=builder /src/dist /app

# Delete useless files. We need to temporarily escalate to root user for this task
USER 0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might as well move everything from /app to /usr/share/nginx/html to avoid UID switch.

RUN rm -rf /usr/share/nginx/html \
&& ln -s /app /usr/share/nginx/html
USER 101
Loading