Closed ghost closed 4 years ago
you can use the --user parameter for docker
USER
root (id = 0) is the default user within a container. The image developer can create additional users. Those users are accessible by name. When passing a numeric ID, the user does not have to exist in the container.
The developer can set a default user to run the first process with the Dockerfile USER instruction. When starting a container, the operator can override the USER instruction by passing the -u option.
-u="", --user="": Sets the username or UID used and optionally the groupname or GID for the specified command.
The followings examples are all valid:
--user=[ user | user:group | uid | uid:gid | user:gid | uid:group ]
Note: if you pass a numeric uid, it must be in the range of 0-2147483647.
source: https://docs.docker.com/engine/reference/run/ example:
--user $(id -u USER):$(id -g GROUP)
works fine for 3.9.1
cheers Itow :D
Running Podman, not Docker. I'm already using the runAsUser
Kube YAML directive, no luck (it usually works, of course).
Podman only introduced support for runAsUser
in https://github.com/containers/libpod/releases/tag/v1.7.0, safe to say @It0w was probably right.
This image should support user/UID and group/GID environment variables, and running ts3server as a specified user instead of the currently hardcoded 9987.