docker run -u 1000:1000 myapp

Category: Docker

docker run -u 1000:1000 myapp

Run a container as a specific user

Runs the container's main process as UID 1000, group 1000, instead of root. Files created inside map to that user on the host. -u accepts user names or numeric UID:GID pairs.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.