Skip to content

Commit ccfcf0b

Browse files
authored
Merge pull request #854 from jhowardmsft/mount
Mount correction
2 parents 2719e66 + 9685415 commit ccfcf0b

File tree

2 files changed

+23
-21
lines changed

2 files changed

+23
-21
lines changed

config.md

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,10 @@ For all platform-specific configuration values, the scope defined below in the [
6565
For Linux, the parameters are as documented in [mount(2)][mount.2] system call man page.
6666
For Solaris, the mount entry corresponds to the 'fs' resource in the [zonecfg(1M)][zonecfg.1m] man page.
6767

68-
6968
* **`destination`** (string, REQUIRED) Destination of mount point: path inside container.
7069
This value MUST be an absolute path.
7170
* Windows: one mount destination MUST NOT be nested within another mount (e.g., c:\\foo and c:\\foo\\bar).
7271
* Solaris: corresponds to "dir" of the fs resource in [zonecfg(1M)][zonecfg.1m].
73-
* **`type`** (string, OPTIONAL) The type of the filesystem to be mounted.
74-
* Linux: filesystem types supported by the kernel as listed in */proc/filesystems* (e.g., "minix", "ext2", "ext3", "jfs", "xfs", "reiserfs", "msdos", "proc", "nfs", "iso9660").
75-
* Windows: this field MUST NOT be supplied.
76-
* Solaris: corresponds to "type" of the fs resource in [zonecfg(1M)][zonecfg.1m].
7772
* **`source`** (string, OPTIONAL) A device name, but can also be a directory name or a dummy.
7873
Path values are either absolute or relative to the bundle.
7974
* Windows: a local directory on the filesystem of the container host. UNC paths and mapped drives are not supported.
@@ -83,6 +78,26 @@ For all platform-specific configuration values, the scope defined below in the [
8378
Note both [filesystem-independent][mount.8-filesystem-independent] and [filesystem-specific][mount.8-filesystem-specific] options are listed.
8479
* Solaris: corresponds to "options" of the fs resource in [zonecfg(1M)][zonecfg.1m].
8580

81+
### Example (Windows)
82+
83+
```json
84+
"mounts": [
85+
{
86+
"destination": "C:\\folder-inside-container",
87+
"source": "C:\\folder-on-host",
88+
"options": []
89+
}
90+
]
91+
```
92+
93+
### <a name="configLinuxAndSolarisMounts" />Linux and Solaris Mounts
94+
95+
For Linux and Solaris based systems the mounts structure has the following fields:
96+
97+
* **`type`** (string, OPTIONAL) The type of the filesystem to be mounted.
98+
* Linux: filesystem types supported by the kernel as listed in */proc/filesystems* (e.g., "minix", "ext2", "ext3", "jfs", "xfs", "reiserfs", "msdos", "proc", "nfs", "iso9660").
99+
* Solaris: corresponds to "type" of the fs resource in [zonecfg(1M)][zonecfg.1m].
100+
86101
### Example (Linux)
87102

88103
```json
@@ -102,18 +117,6 @@ For all platform-specific configuration values, the scope defined below in the [
102117
]
103118
```
104119

105-
### Example (Windows)
106-
107-
```json
108-
"mounts": [
109-
{
110-
"destination": "C:\\folder-inside-container",
111-
"source": "C:\\folder-on-host",
112-
"options": []
113-
}
114-
]
115-
```
116-
117120
### Example (Solaris)
118121

119122
```json

specs-go/config.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,11 @@ type Platform struct {
112112

113113
// Mount specifies a mount for a container.
114114
type Mount struct {
115-
// 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.
115+
// Destination is the absolute path where the mount will be placed in the container.
116116
Destination string `json:"destination"`
117117
// Type specifies the mount kind.
118-
Type string `json:"type,omitempty"`
119-
// Source specifies the source path of the mount. In the case of bind mounts on
120-
// Linux based systems this would be the file on the host.
118+
Type string `json:"type,omitempty" platform:"linux,solaris"`
119+
// Source specifies the source path of the mount.
121120
Source string `json:"source,omitempty"`
122121
// Options are fstab style mount options.
123122
Options []string `json:"options,omitempty"`

0 commit comments

Comments
 (0)