The documentation claims volumes are not mounted recursively:
To recursively mount a volume and all of its submounts into a
<<container|pod>>, use the **rbind** option. By default the bind option is
used, and submounts of the source directory is not mounted into the
<<container|pod>>.
But it looks like rbind is the default, and since flags look like they are additive in the code I have not been able to find a way to disable MS_REC to make it work non-recursively.
Steps to reproduce the issue
Steps to reproduce the issue
as root
mkdir -p /tmp/podman/submount; mount -t tmpfs tmpfs /tmp/podman/submount
podman run --rm -v /tmp/podman:/tmp/podman docker.io/alpine df | grep tmp/podman
(sorry, can't run podman 5.0.0 on debian bookworm because go version is too old, but I didn't see any code change around that and the behaviour has been the same since at least podman 3...)
Additional information
Running with strace one can see MS_REC is being set:
Issue Description
The documentation claims volumes are not mounted recursively:
But it looks like rbind is the default, and since flags look like they are additive in the code I have not been able to find a way to disable
MS_REC
to make it work non-recursively.Steps to reproduce the issue
Steps to reproduce the issue
mkdir -p /tmp/podman/submount; mount -t tmpfs tmpfs /tmp/podman/submount
podman run --rm -v /tmp/podman:/tmp/podman docker.io/alpine df | grep tmp/podman
Describe the results you received
submount was listed despite not specifying rbind for the volume
Describe the results you expected
submount should not be present
podman info output
Podman in a container
No
Privileged Or Rootless
Privileged
Upstream Latest Release
No
Additional environment details
(sorry, can't run podman 5.0.0 on debian bookworm because go version is too old, but I didn't see any code change around that and the behaviour has been the same since at least podman 3...)
Additional information
Running with strace one can see MS_REC is being set:
Trying various flags like
:bind
has no impact, so it's like rbind is the default despite being documented otherwise.