Skip to content

Commit 9685415

Browse files
author
John Howard
committed
Mount correction
Signed-off-by: John Howard <[email protected]>
1 parent b1ccc59 commit 9685415

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,22 +65,37 @@ 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
* Windows: a local directory on the filesystem of the container host. UNC paths and mapped drives are not supported.
7974
* Solaris: corresponds to "special" of the fs resource in [zonecfg(1M)][zonecfg.1m].
8075
* **`options`** (array of strings, OPTIONAL) Mount options of the filesystem to be used.
8176
* 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.
8277
* Solaris: corresponds to "options" of the fs resource in [zonecfg(1M)][zonecfg.1m].
8378

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

86101
```json
@@ -100,18 +115,6 @@ For all platform-specific configuration values, the scope defined below in the [
100115
]
101116
```
102117

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

117120
```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)