# Docker container with "docker run --user"

**URL:** <https://forums.plex.tv/t/docker-container-with-docker-run-user/887399>\
**Category:** Plex Media Server\
**Tags:** server-docker\
**Created:** [September 5, 2024, 12:13pm UTC](https://forums.plex.tv/t/docker-container-with-docker-run-user/887399 "2024-09-05T12:13:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chet](https://avatars.discourse-cdn.com/v4/letter/c/9dc877/32.png) [@chet](https://forums.plex.tv/u/chet)\
**Post date:** [September 5, 2024, 12:13pm UTC](https://forums.plex.tv/t/docker-container-with-docker-run-user/887399/1 "2024-09-05T12:13:13Z")

</div>

I notice that in the plex container, only the s6 supervisor software runs as root while the Plex application itself runs as the supplied PLEX\_UID.  
As of version 3.2.0.0 (released 3 months ago), the s6-overlay software supports running as a non root user. From [their readme](https://github.com/just-containers/s6-overlay/blob/master/README.md):

> As of version 3.2.0.0, s6-overlay has limited support for running as a user other than `root`:
> 
> - Tools like `fix-attrs` and `logutil-service` are unlikely to work (they rely on being able to change UIDs).
> - The syslogd emulation will not work.
> 
> Generally speaking, if you’re running a simple container with a **main application and one or two support services** , you may benefit from the `USER` directive if that is your preferred way of running containers.

The plex container seems to fit the bill. Could you please consider supporting running the plexinc/pms-docker image with “docker run --user myusername”? In general, it’s more secure for containers to never have root. If you fully commit to having your users always supply “–user” and trust docker users to not mess up directory permissions, you can get rid of PLEX\_UID, PLEX\_GID, CHANGE\_CONFIG\_DIR\_OWNERSHIP variables and simplify your code as well.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [December 4, 2024, 12:14pm UTC](https://forums.plex.tv/t/docker-container-with-docker-run-user/887399/2 "2024-12-04T12:14:06Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
