Skip to content

Commit 76c0da2

Browse files
Dongsu Parkh-vetinari
authored andcommitted
config-linux: describe more about rootfs mount propagation
Section of rootfs mount propagation modes should include more descriptions about each propagation mode as well as its actual meaning in the real world. Since the shared subtrees document in the Linux Kernel is not exactly readable for ordinary users, we should elaborate more on this topic in the runtime-spec. Fixes #973 Suggested by @alban, @iaguis Signed-off-by: Dongsu Park <[email protected]> Signed-off-by: H. Vetinari <[email protected]>
1 parent d5b400c commit 76c0da2

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

config-linux.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,18 @@ The following parameters can be specified to set up seccomp:
654654
## <a name="configLinuxRootfsMountPropagation" />Rootfs Mount Propagation
655655

656656
**`rootfsPropagation`** (string, OPTIONAL) sets the rootfs's mount propagation.
657-
Its value is either slave, private, shared or unbindable.
657+
Its value is either `shared`, `slave`, `shared+slave`, `private` or `unbindable`.
658+
It's worth noting that a peer group is defined as a group of VFS mounts that propagate events to each other.
659+
A nested container is defined as a container launched inside an existing container.
660+
661+
* **`shared`**: the rootfs mount belongs to a new peer group.
662+
This means that further mounts (e.g. nested containers) will also belong to that peer group and will propagate events to the rootfs.
663+
Note this does not mean that it's shared with the host.
664+
* **`slave`**: the rootfs mount receives propagation events from the host (e.g. if something is mounted on the host it will also appear in the container) but not the other way around.
665+
* **`shared+slave`**: the rootfs mount is slave to the host but it also has its own peer group, so mounts from the host will appear in the container and in a nested container (if the nested container `rootfsPropagation` option allows it), but mounts in a nested container can only propagate to the rootfs and not to the host.
666+
* **`private`**: the rootfs mount doesn't receive mount propagation events from the host and further mounts in nested containers will be isolated from the host and from the rootfs (even if the nested container `rootfsPropagation` option is shared).
667+
* **`unbindable`**: the rootfs mount is a private mount that cannot be bind-mounted.
668+
658669
The [Shared Subtrees][sharedsubtree] article in the kernel documentation has more information about mount propagation.
659670

660671
### Example

0 commit comments

Comments
 (0)