Docker image should not run as root #702

Closed
opened 2025-11-11 14:29:24 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @putnam on GitHub (Apr 23, 2024).

Is your feature request related to a problem? Please describe.
Docker containers running as root are dangerous. It is a best practice to write your Dockerfile such that it drops privileges to another user ID before starting up, or, alternatively, write it in such a way that the --user setting in Docker will work as expected. Currently the Dockerfile included with this project depends completely on the context of the root user and will not function if you try to run it any other way.

Describe the solution you'd like
Use either the privilege dropping strategy (preferably with a UID/GID environment variable as many other containers use) or support the --user param correctly.

Originally created by @putnam on GitHub (Apr 23, 2024). **Is your feature request related to a problem? Please describe.** Docker containers running as root are dangerous. It is a best practice to write your Dockerfile such that it drops privileges to another user ID before starting up, or, alternatively, write it in such a way that the `--user` setting in Docker will work as expected. Currently the Dockerfile included with this project depends completely on the context of the root user and will not function if you try to run it any other way. **Describe the solution you'd like** Use either the privilege dropping strategy (preferably with a UID/GID environment variable as many other containers use) or support the --user param correctly.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#702