-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mount host volume in another host volume: unexpected leftover folder #41670
Comments
In my opinion, I think the result is reasonable. But it is also interesting to see what will happen when we introduce more complex recurisve mounting. Because when you run this command: Therefore a directory must be created under And of course the folder created by the container is using |
Ok, if not avoidable, it is reasonable that there is a visible mount point while the container is running. |
Let me close this ticket for now, as it looks like it went stale. |
Description
Issue with
--volume
:If I mount a host folder
dir1
in a container,and mount another host folder
dir2
as a subfolder of first mounted folderdir1
,docker creates a persistent host folder
dir2
in folderdir1
.Steps to reproduce the issue:
HOME
, check them withls -la
.ls -la
of "parent" folder in container.ls -la
on host again. Compare with first output.Describe the results you received:
A folder
~/dir1/dir2
with ownershiproot:root
remains as a leftover of mounting one user owned folder into another.In the example, the last
ls -la
shows this entry that should not exist:It appears at container startup and remains after stopping&removing the container.
In container it shows correct uid:gid (here
1000:1000
orlauscher:lauscher
), on host the ownership isroot:root
.Describe the results you expected:
There should appear no folder on host in
~/dir1
and furthermore it should not remain as a leftover.Output of
docker version
:Output of
docker info
:The text was updated successfully, but these errors were encountered: