teamspeak-linux-docker-images
teamspeak-linux-docker-images copied to clipboard
Permissions get set to 9987 user every time i start the container
Hey guys,
this is how it looks like:
masteruser@mainframe:/opt/sinusbot$ sudo chown -R root:root . masteruser@mainframe:/opt/sinusbot$ ls -la total 24 drwxr-xr-x 5 root root 4096 Apr 2 01:54 . drwxr-xr-x 8 root root 4096 Mar 28 22:15 .. drwxr-xr-x 7 root root 4096 Apr 2 01:35 data -rw-r--r-- 1 root root 708 Apr 2 01:53 docker-compose.yml drwxr-xr-x 2 root root 4096 Apr 2 01:49 scripts drwxr-xr-x 9 root root 4096 Apr 2 01:53 teamspeak masteruser@mainframe:/opt/sinusbot$ sudo docker-compose down Stopping teamspeak ... done Stopping sinusbot ... done Removing teamspeak ... done Removing sinusbot ... done Removing network sinusbot_tsnetwork masteruser@mainframe:/opt/sinusbot$ sudo docker-compose up -d Creating network "sinusbot_tsnetwork" with driver "bridge" Creating teamspeak ... done Creating sinusbot ... done masteruser@mainframe:/opt/sinusbot$ ls -la total 24 drwxr-xr-x 5 root root 4096 Apr 2 01:54 . drwxr-xr-x 8 root root 4096 Mar 28 22:15 .. drwxr-xr-x 7 root root 4096 Apr 2 01:35 data -rw-r--r-- 1 root root 708 Apr 2 01:53 docker-compose.yml drwxr-xr-x 2 root root 4096 Apr 2 01:55 scripts drwxr-xr-x 9 9987 root 4096 Apr 2 01:53 teamspeak
Why are the permissions always changed and don't stay with root?
Because teamspeak will not run as root (as it should) and thus has to change the permissions to be able to operate: https://github.com/TeamSpeak-Systems/teamspeak-linux-docker-images/blob/master/alpine/entrypoint.sh#L4
You should be able to set another uid (!=0), though.
You should be able to set another uid (!=0), though.
The Dockerfile would need to take environment variables for this into account, e. g. PUID
for the user ID and PGID
for the group ID.
https://github.com/TeamSpeak-Systems/teamspeak-linux-docker-images/blob/master/alpine/Dockerfile#L5-L6
I'd be happy to see this implemented.
Cross-ref: issue #51