Skip to content

Commit 55559d0

Browse files
committed
config: Drop 'type' from bind-mount example
This initially came in with b3918a2 (Add bind mount example, 2015-06-30), but the 'bind' value is not one of the types you can get out of /proc/filesystems. Instead, bind mounts should leave the type unset and put either 'bind' or 'rbind' in options (although neither of those are documented either [1]). Since documenting (r)bind seems to be too difficult, we should at least stop setting type in the example to stop confusing users [2,3]. Runc still checks .Type instead of .Options for bind-ness in a few places [4,5,6], but we can address all of those by setting .Device to "bind" depending on .Options at [4]. [1]: opencontainers#771 [2]: opencontainers/runc#1744 [3]: https://groups.google.com/a/opencontainers.org/forum/#!topic/dev/2gia6t1Dnv0 Subject: Runc default mount type Date: Tue, 6 Mar 2018 14:19:40 -0800 (PST) Message-Id: <[email protected]> [4]: https://github.com/opencontainers/runc/blob/v1.0.0-rc5/libcontainer/specconv/spec_linux.go#L272-L276 [5]: https://github.com/opencontainers/runc/blob/v1.0.0-rc5/libcontainer/rootfs_linux.go#L33 [6]: https://github.com/opencontainers/runc/blob/v1.0.0-rc5/libcontainer/rootfs_linux.go#L234 Signed-off-by: W. Trevor King <[email protected]>
1 parent fa4b36a commit 55559d0

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

config.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ For POSIX platforms the `mounts` structure has the following fields:
115115
},
116116
{
117117
"destination": "/data",
118-
"type": "bind",
119118
"source": "/volumes/testing",
120119
"options": ["rbind","rw"]
121120
}

0 commit comments

Comments
 (0)