Is it possible to use volume copyup together with --userns auto
and volume option idmap=uids=@2000-1000-1
?
#24330
Unanswered
eriksjolund
asked this question in
Q&A
Replies: 1 comment
-
Probably this is an analogous problem (but somewhat simpler as it does not make use of a Containerfile)
The ownership root:root shown in Step 3 match how it looks like in docker.io/library/ubuntu
The ownership nobody:nogroup shown in Step 4 does not match how it looks like in docker.io/library/ubuntu
In Step 4 I had hoped to see the ownerhip root:root side note: I also tried a slightly modified bash script: --- test.bash.orig 2024-10-26 08:55:47.298401621 +0000
+++ test.bash 2024-10-26 08:55:54.863212796 +0000
@@ -3,10 +3,10 @@
set -o errexit
podman volume rm --force vol1 > /dev/null
-podman volume create --opt o=uid=2,gid=2 vol1 > /dev/null
+podman volume create vol1 > /dev/null
podman run \
--rm \
--userns=auto \
- --mount "type=volume,source=vol1,destination=/etc/cron.daily,Z=true,idmap=uids=@2-0-10000;gids=@2-0-10000" \
+ --mount "type=volume,source=vol1,destination=/etc/cron.daily,Z=true,idmap=uids=@0-0-10000;gids=@0-0-10000" \
docker.io/library/ubuntu \
"$@" but it produced the same ownership results. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In this example I populate a named volume in a Containerfile.
I want all the contents of the volume to have ownership 1000:1000 in the container
but ownership 2000:2000 on the host.
Do you know if this is possible? (I don't get it to work)
I installed Podman from the git main branch (git commit 290d94d )
Describe the results you received
The following output is printed in Step 6
Describe the results you expected
I expected to see the following output being printed in Step 6
podman info output
Click me
Beta Was this translation helpful? Give feedback.
All reactions