Skip to content

[Docker] Enforce container security#812

Open
DodoLeDev wants to merge 1 commit intoAwesome-Technologies:masterfrom
DodoLeDev:patch-1
Open

[Docker] Enforce container security#812
DodoLeDev wants to merge 1 commit intoAwesome-Technologies:masterfrom
DodoLeDev:patch-1

Conversation

@DodoLeDev
Copy link
Copy Markdown

Hi!

I am trying to use your application through containers, and I found out that it defaults to root user while not being necessary.

Here are the necessary edits to make your app working completely unprivileged

The container now works completely unprivileged
Comment thread Dockerfile
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants