-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Open
Labels
area/securitykind/enhancementEnhancements are not bugs or new features but can improve usability or performance.Enhancements are not bugs or new features but can improve usability or performance.status/1-design-review
Description
Description
Docker/Moby does not accept rprivate propagation when the mount source contains the daemon root (/var/lib/docker) :
$ docker run -it --rm -v /:/mnt:rprivate alpine
docker: Error response from daemon: invalid mount config: must use either propagation mode "rslave" or "rshared" when mount source is within the daemon root, daemon root: "/var/lib/docker", bind mount source: "/", propagation: "rprivate".
See 'docker run --help'.
This can be an issue when Docker/Moby supports "recursively read-only" (RRO) mounts:
So I'd suggest introducing an mount option for forcibly enabling rprivate propagation
e.g.,
docker run -v /:/mnt:rro,rprivate-force
Or
docker run --mount type=bind,src=/,dst=/mnt,rro,bind-propagation=rprivate,bind-propagation-force=true
Metadata
Metadata
Assignees
Labels
area/securitykind/enhancementEnhancements are not bugs or new features but can improve usability or performance.Enhancements are not bugs or new features but can improve usability or performance.status/1-design-review