Podman behavior with shared volumes : copying files from mounted path #12714
Labels
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
/kind bug
Description
I don't know if this is "on purpose" but the behavior with named volumes is different between Docker and Podman.
If you mount an "empty" volume into a docker container to a new path (say "/opt/test") and then mount the same volume to another container to a "non-empty" path, then the content of the "non-empty" path will be copied on to the volume.
With Podman, the volume will remain "empty" as soon as it was mounted to one container.
Docker is more permissive and will allow the data to be copied if the volume is empty (even if it was mounted previously).
Steps to reproduce the issue:
Describe the results you received:
When running
ls
on the volume, that is to say either:ls /opt/test
in the first containerls /var
in the second containerThe folder is empty.
Describe the results you expected:
With Docker, the folder would contain the content copied from the
/var
directory of the centos:7 container.Additional information you deem important (e.g. issue happens only occasionally):
None
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
Podman troubleshooting guide : YES
Podman lastest release (3.4.0) : NO
Additional environment details (AWS, VirtualBox, physical, etc.):
Running in Vagrant with Virtualbox provider.
The text was updated successfully, but these errors were encountered: