diff --git a/config.md b/config.md index aedcf142f..7158ba290 100644 --- a/config.md +++ b/config.md @@ -59,6 +59,7 @@ For Solaris, the mount entry corresponds to the 'fs' resource in the [zonecfg(1M * **`destination`** (string, REQUIRED) Destination of mount point: path inside container. This value MUST be an absolute path. + * Posix: the path and child directories MUST exist, a runtime MUST NOT create directories automatically to a mount point. * Windows: one mount destination MUST NOT be nested within another mount (e.g., c:\\foo and c:\\foo\\bar). * Solaris: corresponds to "dir" of the fs resource in [zonecfg(1M)][zonecfg.1m]. * **`type`** (string, OPTIONAL) The type of the filesystem to be mounted. @@ -69,7 +70,7 @@ For Solaris, the mount entry corresponds to the 'fs' resource in the [zonecfg(1M * Windows: a local directory on the filesystem of the container host. UNC paths and mapped drives are not supported. * Solaris: corresponds to "special" of the fs resource in [zonecfg(1M)][zonecfg.1m]. * **`options`** (array of strings, OPTIONAL) Mount options of the filesystem to be used. - * Linux: supported options are listed in the [mount(8)][mount.8] man page. Note both [filesystem-independent][mount.8-filesystem-independent] and [filesystem-specific][mount.8-filesystem-specific] options are listed. + * Linux: supported options are listed in the [mount(8)][mount.8] man page. Note both [filesystem-independent][mount.8-filesystem-independent] and [filesystem-specific][mount.8-filesystem-specific] options are listed. In the case of bind mounts, this would be the file on the host. * Solaris: corresponds to "options" of the fs resource in [zonecfg(1M)][zonecfg.1m]. ### Example (Linux) diff --git a/specs-go/config.go b/specs-go/config.go index b67c6b8f7..9f09de11e 100644 --- a/specs-go/config.go +++ b/specs-go/config.go @@ -112,12 +112,11 @@ type Platform struct { // Mount specifies a mount for a container. type Mount struct { - // Destination is the path where the mount will be placed relative to the container's root. The path and child directories MUST exist, a runtime MUST NOT create directories automatically to a mount point. + // Destination is the absolute path where the mount will be placed in the container. Destination string `json:"destination"` // Type specifies the mount kind. - Type string `json:"type,omitempty"` - // Source specifies the source path of the mount. In the case of bind mounts on - // Linux based systems this would be the file on the host. + Type string `json:"type,omitempty" platform:"linux,solaris"` + // Source specifies the source path of the mount. Source string `json:"source,omitempty"` // Options are fstab style mount options. Options []string `json:"options,omitempty"`