From 55559d0a4ffba1a8f8ad711d8369fb5d9834351e Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 6 Mar 2018 15:08:14 -0800 Subject: [PATCH] config: Drop 'type' from bind-mount example This initially came in with b3918a25 (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]: https://github.com/opencontainers/runtime-spec/pull/771 [2]: https://github.com/opencontainers/runc/issues/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: <57e18bd7-caad-4e21-bd7e-df016fda3efd@opencontainers.org> [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 --- config.md | 1 - 1 file changed, 1 deletion(-) diff --git a/config.md b/config.md index 06801f5dd..a1a9a1aed 100644 --- a/config.md +++ b/config.md @@ -115,7 +115,6 @@ For POSIX platforms the `mounts` structure has the following fields: }, { "destination": "/data", - "type": "bind", "source": "/volumes/testing", "options": ["rbind","rw"] }