[Docker] Environment variable: PUID and PGID
See original GitHub issueDescription
Hello. As i want to run more secure environment of my homelab, i don’t want to run any docker container as root.
Suggestion: Every Linuxserver image has it’s common environment variables like TZ (timezone), PUID (user ID of user that will run the container), PGID (group ID of user that will run the container). Those last two i’d like to see also in Homarr. Many docker images of countless projects have it.
Things i tried:
As i’m managing my container in Portainer Web UI, i needed to select different way of achieving user definition. Docker itself has --user: 1000:1000
which defines which user will run the container.
- This can be easily done by going to Container -> Labels -> write name
user
and value1000:1000
. However, this didn’t work.
Priority
High (App breaking feature)
Please tick the boxes
- You’ve read the docs
- You’ve checked for duplicate issues
Issue Analytics
- State:
- Created a year ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Understanding PUID and PGID - LinuxServer.io
Using the PUID and PGID allows our containers to map the container's internal user to a user on the host machine. All of...
Read more >How does PUID/PGID actually work in docker - Reddit
PUID and PGID are the ids of the user and group you want to use for the container. This is useful so you...
Read more >Difference between PGID/PUID and GID/UID when setting up ...
Using the PUID and PGID allows our containers to map the container's internal user to a user on the host machine. All of...
Read more >[Feature] Add PUID and PGID environment variables to run ...
I would like to run changedetection.io as a particular user, which would solve a lot of permission issues. In all LSIO containers I...
Read more >Help me understand the benefits of rootless docker over PUID ...
It supports running the application internally as a non-root user via su-exec and PUID/PGID environment variables.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t think PUID and GUID has anything to with NextJS, as @Pheggas said it’s just defining which user and group the docker container uses. I have no idea how to pass this to the actual container, but I’ll do some research.
hello, this does not seem to address the issue if I understand correctly … root user is still used in container and config files are created with root. my docker compose file :
content of conf folder :