Docker Community Forums

Share and learn in the Docker community.

Mount bind within mounted volume


(Hendrikhaddorp) #1

Hi,

I’m starting a container with a mounted volume. After that I’m doing a mount --bind between two directories within the volume. This works all fine in the container but on the host the mount bind does not seem to have any effect. Is there any way to get my mount bind from in the container to also effect the host?

I tested this with docker 1.10 and 1.12.1.

thanks,
Hendrik


(Hendrikhaddorp) #2

Just found this: https://github.com/docker/docker/pull/17034
Using :shared on the mount seems to actually do the trick.

It is actually kinda stated in the documentation but not in much detail.


(Hendrikhaddorp) #3

Looks like this ticket is open for the documentation already: https://github.com/docker/docker/issues/20656