{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/15648","labels_url":"https://api.github.com/repos/docker/docker/issues/15648/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/15648/comments","events_url":"https://api.github.com/repos/docker/docker/issues/15648/events","html_url":"https://github.com/docker/docker/pull/15648","id":101519067,"number":15648,"title":"Add rootfs mountpropagation flags","user":{"login":"rootfs","id":7062400,"avatar_url":"https://avatars.githubusercontent.com/u/7062400?v=3","gravatar_id":"","url":"https://api.github.com/users/rootfs","html_url":"https://github.com/rootfs","followers_url":"https://api.github.com/users/rootfs/followers","following_url":"https://api.github.com/users/rootfs/following{/other_user}","gists_url":"https://api.github.com/users/rootfs/gists{/gist_id}","starred_url":"https://api.github.com/users/rootfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rootfs/subscriptions","organizations_url":"https://api.github.com/users/rootfs/orgs","repos_url":"https://api.github.com/users/rootfs/repos","events_url":"https://api.github.com/users/rootfs/events{/privacy}","received_events_url":"https://api.github.com/users/rootfs/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/status/1-design-review","name":"status/1-design-review","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-17T21:58:01Z","updated_at":"2015-08-26T14:03:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/15648","html_url":"https://github.com/docker/docker/pull/15648","diff_url":"https://github.com/docker/docker/pull/15648.diff","patch_url":"https://github.com/docker/docker/pull/15648.patch"},"body":"This is to replace previous pull request #14097. It currently depends on unmerged libcontainer patch from https://github.com/opencontainers/runc/issues/208\r\n\r\nConfigure rootfs mount propagation through `--rootmount` flag:\r\nTo set the rootfs mount propagation to shared: `docker run --rootmount=container_shared fedora`\r\nTo set the rootfs mount propagation to private: `docker run --rootmount=container_private fedora`\r\nTo set the rootfs mount propagation to slave: `docker run --rootmount=container_slave fedora`\r\n\r\nA sample output of `--rootmount=container_shared` is\r\n```console\r\n# docker run -ti --net=host --rootmount=container_shared --privileged -v /test:/test centos  findmnt -o TARGET,PROPAGATION |grep test\r\n|-/test                               shared\r\n```\r\n\r\nA sample output of `--rootmount=container_slave` is\r\n```console\r\n# docker run -ti --net=host --rootmount=container_slave --privileged -v /test:/test centos  findmnt -o TARGET,PROPAGATION |grep test\r\n|-/test                               private,slave\r\n```\r\n\r\nUse cases for different propagation modes are\r\n\r\n  |  Propogation | Container mounts dir | Host mounts dir | Use case\r\n--- | --- | ---| ---| ---\r\n1 | Shared | Both container and host see the dir | Both container and host see the dir | Use a container to mount filesystems on the host so other containers can see it\r\n2 | Slave | container sees dir but host cannot | Both container and host see the dir | automount, etc\r\n3 | Private | container sees dir but host doesn't | host sees dir but container doesn't | current default\r\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/135032084","html_url":"https://github.com/docker/docker/pull/15648#issuecomment-135032084","issue_url":"https://api.github.com/repos/docker/docker/issues/15648","id":135032084,"user":{"login":"fgrzadkowski","id":10820726,"avatar_url":"https://avatars.githubusercontent.com/u/10820726?v=3","gravatar_id":"","url":"https://api.github.com/users/fgrzadkowski","html_url":"https://github.com/fgrzadkowski","followers_url":"https://api.github.com/users/fgrzadkowski/followers","following_url":"https://api.github.com/users/fgrzadkowski/following{/other_user}","gists_url":"https://api.github.com/users/fgrzadkowski/gists{/gist_id}","starred_url":"https://api.github.com/users/fgrzadkowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fgrzadkowski/subscriptions","organizations_url":"https://api.github.com/users/fgrzadkowski/orgs","repos_url":"https://api.github.com/users/fgrzadkowski/repos","events_url":"https://api.github.com/users/fgrzadkowski/events{/privacy}","received_events_url":"https://api.github.com/users/fgrzadkowski/received_events","type":"User","site_admin":false},"created_at":"2015-08-26T14:03:11Z","updated_at":"2015-08-26T14:03:11Z","body":"@rootfs @pmorie \r\nIs there a way to workaround lack of this feature in the current Docker release? Maybe some manual ```mount --make-rshared /``` would work here? I've been trying to do it, but couldn't find a proper combination. Any suggestion welcomed :)"}}