What is mount propagation (`rprivate`, `rshared`) on bind mounts?
AdvancedConceptVolumes & Bind Mounts
Answer
It controls whether mounts created under a bind-mounted directory propagate between host and container. Docker defaults to rprivate (none). rslave lets host mounts appear in the container; rshared is two-way and needs the host mount to be shared. Needed by tools like CSI node drivers or rclone mount containers.
docker run -v /mnt/data:/data:rshared ...
More on Volumes & Bind Mounts
What are the three ways to persist or share data with a container?BeginnerVolume vs bind mount: when do you pick which?BeginnerWhat is the difference between `-v` and `--mount`?BeginnerWhat is an anonymous volume and how do you find leftovers?IntermediateHow does a new named volume get populated?IntermediateHow do you back up and restore a named volume?Intermediate