Replies: 2 comments 3 replies
-
If you want to map UID 900 on the host to the UID 6000 in the container, you could use --uidmap. There are two related tips in troubleshooting.md: (Both of them are just variations of the same problem) Edit 1:I assumed that UID 900 is either the UID of your regular user or one of the subordinate UIDs of your regular user on the host. Edit 2:I noticed that the Dockerfile contains the number 60000
but in the text there is a command using the number 6000
Those numbers differ (60000 > 6000). |
Beta Was this translation helpful? Give feedback.
-
Did you try to mound with the :U option? |
Beta Was this translation helpful? Give feedback.
-
Hi there,
we're currently switching completely from docker to podman and furthermore to rootless containers. However we having troubles to build, more especially, to test our services on jenkins with rootless podman.
In my Dockerfiles i create a new user with id 6000 and group id 6000, which is intended to run the service as rootless user afterwards. For this i install necessary packages as root and later on switch to the user and its working directory. So far so good.
When running the unit tests, i have to mount the source code directory to the container, which is owned by a different user (id 900).
How can i make sure that the inside user (6000) has full write permissions to the volume , without overriding the permissions of the hostsystem ?
i tried it already with:
podman unshare chown -R 6000:6000 ./src -> results into overriding the permissions on host
userns=keep-id -> new user inside of container can access the volume correctly, but doesn't have access to the installed packages for user 6000 defined in Dockerfile.
root -> works but no. :)
Thanks for all your help !
Dockerfile example:
podman run command:
Beta Was this translation helpful? Give feedback.
All reactions