@@ -77,11 +77,87 @@ For Solaris, the mount entry corresponds to the 'fs' resource in the [zonecfg(1M
77
77
* Windows: a local directory on the filesystem of the container host. UNC paths and mapped drives are not supported.
78
78
* Solaris: corresponds to "special" of the fs resource in [ zonecfg(1M)] [ zonecfg.1m ] .
79
79
* ** ` options ` ** (array of strings, OPTIONAL) Mount options of the filesystem to be used.
80
- * Linux: supported options are listed in the [ mount(8)] [ mount.8 ] man page.
81
- Note both [ filesystem-independent] [ mount.8-filesystem-independent ] and [ filesystem-specific] [ mount.8-filesystem-specific ] options are listed.
80
+ * Linux: See [ Linux mount options] ( #configLinuxMountOptions ) below.
82
81
* Solaris: corresponds to "options" of the fs resource in [ zonecfg(1M)] [ zonecfg.1m ] .
83
82
* Windows: runtimes MUST support ` ro ` , mounting the filesystem read-only when ` ro ` is given.
84
83
84
+ ### <a name =" configLinuxMountOptions " />Linux mount options
85
+
86
+ Runtimes MUST/SHOULD/MAY implement the following option strings for Linux:
87
+
88
+ Option name | Requirement | Description
89
+ ------------------|-------------|-----------------------------------------------------
90
+ ` async ` | MUST | [ ^ 1 ]
91
+ ` atime ` | MUST | [ ^ 1 ]
92
+ ` bind ` | MUST | [ ^ 2 ] (bind mounts)
93
+ ` defaults ` | MUST | [ ^ 1 ]
94
+ ` dev ` | MUST | [ ^ 1 ]
95
+ ` diratime ` | MUST | [ ^ 1 ]
96
+ ` dirsync ` | MUST | [ ^ 1 ]
97
+ ` exec ` | MUST | [ ^ 1 ]
98
+ ` iversion ` | MUST | [ ^ 1 ]
99
+ ` lazytime ` | MUST | [ ^ 1 ]
100
+ ` loud ` | MUST | [ ^ 1 ]
101
+ ` mand ` | MAY | [ ^ 1 ] (Deprecated in kernel 5.15, util-linux 2.38)
102
+ ` noatime ` | MUST | [ ^ 1 ]
103
+ ` nodev ` | MUST | [ ^ 1 ]
104
+ ` nodiratime ` | MUST | [ ^ 1 ]
105
+ ` noexec ` | MUST | [ ^ 1 ]
106
+ ` noiversion ` | MUST | [ ^ 1 ]
107
+ ` nolazytime ` | MUST | [ ^ 1 ]
108
+ ` nomand ` | MAY | [ ^ 1 ]
109
+ ` norelatime ` | MUST | [ ^ 1 ]
110
+ ` nostrictatime ` | MUST | [ ^ 1 ]
111
+ ` nosuid ` | MUST | [ ^ 1 ]
112
+ ` nosymfollow ` | SHOULD | [ ^ 1 ] (Introduced in kernel 5.10, util-linux 2.38)
113
+ ` private ` | MUST | [ ^ 2 ] (bind mounts)
114
+ ` ratime ` | SHOULD | Recursive ` atime ` [ ^ 3 ]
115
+ ` rbind ` | MUST | [ ^ 2 ] (bind mounts)
116
+ ` rdev ` | SHOULD | Recursive ` dev ` [ ^ 3 ]
117
+ ` rdiratime ` | SHOULD | Recursive ` diratime ` [ ^ 3 ]
118
+ ` relatime ` | MUST | [ ^ 1 ]
119
+ ` remount ` | MUST | [ ^ 1 ]
120
+ ` rexec ` | SHOULD | Recursive ` dev ` [ ^ 3 ]
121
+ ` rnoatime ` | SHOULD | Recursive ` noatime ` [ ^ 3 ]
122
+ ` rnodiratime ` | SHOULD | Recursive ` nodiratime ` [ ^ 3 ]
123
+ ` rnoexec ` | SHOULD | Recursive ` noexec ` [ ^ 3 ]
124
+ ` rnorelatime ` | SHOULD | Recursive ` norelatime ` [ ^ 3 ]
125
+ ` rnostrictatime ` | SHOULD | Recursive ` nostrictatime ` [ ^ 3 ]
126
+ ` rnosuid ` | SHOULD | Recursive ` nosuid ` [ ^ 3 ]
127
+ ` rnosymfollow ` | SHOULD | Recursive ` nosymfollow ` [ ^ 3 ]
128
+ ` ro ` | MUST | [ ^ 1 ]
129
+ ` rprivate ` | MUST | [ ^ 2 ] (bind mounts)
130
+ ` rrelatime ` | SHOULD | Recursive ` relatime ` [ ^ 3 ]
131
+ ` rro ` | SHOULD | Recursive ` ro ` [ ^ 3 ]
132
+ ` rrw ` | SHOULD | Recursive ` rw ` [ ^ 3 ]
133
+ ` rshared ` | MUST | [ ^ 2 ] (bind mounts)
134
+ ` rslave ` | MUST | [ ^ 2 ] (bind mounts)
135
+ ` rstrictatime ` | SHOULD | Recursive ` strictatime ` [ ^ 3 ]
136
+ ` rsuid ` | SHOULD | Recursive ` suid ` [ ^ 3 ]
137
+ ` rsymfollow ` | SHOULD | Recursive ` symfollow ` [ ^ 3 ]
138
+ ` runbindable ` | MUST | [ ^ 2 ] (bind mounts)
139
+ ` rw ` | MUST | [ ^ 1 ]
140
+ ` shared ` | MUST | [ ^ 1 ]
141
+ ` silent ` | MUST | [ ^ 1 ]
142
+ ` slave ` | MUST | [ ^ 2 ] (bind mounts)
143
+ ` strictatime ` | MUST | [ ^ 1 ]
144
+ ` suid ` | MUST | [ ^ 1 ]
145
+ ` symfollow ` | SHOULD | Opposite of ` nosymfollow `
146
+ ` sync ` | MUST | [ ^ 1 ]
147
+ ` tmpcopyup ` | MAY | copy up the contents to a tmpfs
148
+ ` unbindable ` | MUST | [ ^ 2 ] (bind mounts)
149
+
150
+ [ ^ 1 ] : Corresponds to [ ` mount(8) ` (filesystem-independent)] [ mount.8-filesystem-independent ] .
151
+ [ ^ 2 ] : Corresponds to [ ` mount(8) ` (filesystem-specific)] [ mount.8-filesystem-specific ] .
152
+ [ ^ 3 ] : These ` AT_RECURSIVE ` options need kernel 5.12 or later. See [ ` mount_setattr(2) ` ] [ mount_setattr.2 ]
153
+
154
+ The "MUST" options correspond to [ ` mount(8) ` ] [ mount.8 ] .
155
+
156
+ Runtimes MAY also implement custom option strings that are not listed in the table above.
157
+ If a custom option string is already recognized by [ ` mount(8) ` ] [ mount.8 ] , the runtime SHOULD follow the behavior of [ ` mount(8) ` ] [ mount.8 ] .
158
+
159
+ Runtimes SHOULD pass unknown options to [ ` mount(2) ` ] [ mount.2 ] via the fifth argument (` const void *data ` ).
160
+
85
161
### Example (Windows)
86
162
87
163
``` json
@@ -1004,6 +1080,7 @@ Here is a full example `config.json` for reference.
1004
1080
[ mount.8 ] : http://man7.org/linux/man-pages/man8/mount.8.html
1005
1081
[ mount.8-filesystem-independent ] : http://man7.org/linux/man-pages/man8/mount.8.html#FILESYSTEM-INDEPENDENT_MOUNT_OPTIONS
1006
1082
[ mount.8-filesystem-specific ] : http://man7.org/linux/man-pages/man8/mount.8.html#FILESYSTEM-SPECIFIC_MOUNT_OPTIONS
1083
+ [ mount_setattr.2 ] : http://man7.org/linux/man-pages/man2/mount_setattr.2.html
1007
1084
[ getrlimit.2 ] : http://man7.org/linux/man-pages/man2/getrlimit.2.html
1008
1085
[ getrlimit.3 ] : http://pubs.opengroup.org/onlinepubs/9699919799/functions/getrlimit.html
1009
1086
[ stdin.3 ] : http://man7.org/linux/man-pages/man3/stdin.3.html
0 commit comments