Expected behaviorwhoami should return test but it returns root, even though I explicitly set USER test in the Dockerfile that built the image.
Host information
Ubuntu 20.04
gitlab-ci-local 4.47.0
Containerd binary
I am using docker
Additional context
I need the docker container to have a specific user, since (as described in #1144) I use a license that is also linked to the user name next to the MAC address. Unfortunately, I don't quite understand how the docker container is run. But since my Dockerfile includes USER test, why is this ignored? Is my image pulled from any registry (in which case the error would make sense) or is a local image used (which would make more sense to me given that its calles gitlab-ci-local but in that case, the image defines the user to be non-root!).
So I guess a --container-user option would solve this problem.
I tried gcl --umask 1000:1000 which is what I get when I run id -u/-g in the docker container.
Minimal .gitlab-ci.yml illustrating the issue
Expected behavior
whoami
should returntest
but it returnsroot
, even though I explicitly setUSER test
in theDockerfile
that built the image.Host information Ubuntu 20.04 gitlab-ci-local 4.47.0
Containerd binary I am using docker
Additional context I need the docker container to have a specific user, since (as described in #1144) I use a license that is also linked to the user name next to the MAC address. Unfortunately, I don't quite understand how the docker container is run. But since my Dockerfile includes
USER test
, why is this ignored? Is my image pulled from any registry (in which case the error would make sense) or is a local image used (which would make more sense to me given that its callesgitlab-ci-local
but in that case, the image defines the user to be non-root!). So I guess a--container-user
option would solve this problem.I tried
gcl --umask 1000:1000
which is what I get when I runid -u/-g
in the docker container.