Skip to content

Add an option to forcibly enable rprivate propagation #44977

@AkihiroSuda

Description

@AkihiroSuda

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

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions