Skip to content

Commit 4b40119

Browse files
author
John Howard
committed
Mount correction
Signed-off-by: John Howard <[email protected]>
1 parent 2ec18c0 commit 4b40119

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
@@ -56,22 +56,37 @@ The runtime MUST mount entries in the listed order.
5656
For Linux, the parameters are as documented in [mount(2)][mount.2] system call man page.
5757
For Solaris, the mount entry corresponds to the 'fs' resource in the [zonecfg(1M)][zonecfg.1m] man page.
5858

59-
6059
* **`destination`** (string, REQUIRED) Destination of mount point: path inside container.
6160
This value MUST be an absolute path.
6261
* Windows: one mount destination MUST NOT be nested within another mount (e.g., c:\\foo and c:\\foo\\bar).
6362
* Solaris: corresponds to "dir" of the fs resource in [zonecfg(1M)][zonecfg.1m].
64-
* **`type`** (string, OPTIONAL) The type of the filesystem to be mounted.
65-
* Linux: filesystem types supported by the kernel as listed in */proc/filesystems* (e.g., "minix", "ext2", "ext3", "jfs", "xfs", "reiserfs", "msdos", "proc", "nfs", "iso9660").
66-
* Windows: this field MUST NOT be supplied.
67-
* Solaris: corresponds to "type" of the fs resource in [zonecfg(1M)][zonecfg.1m].
6863
* **`source`** (string, OPTIONAL) A device name, but can also be a directory name or a dummy.
6964
* Windows: a local directory on the filesystem of the container host. UNC paths and mapped drives are not supported.
7065
* Solaris: corresponds to "special" of the fs resource in [zonecfg(1M)][zonecfg.1m].
7166
* **`options`** (array of strings, OPTIONAL) Mount options of the filesystem to be used.
7267
* 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.
7368
* Solaris: corresponds to "options" of the fs resource in [zonecfg(1M)][zonecfg.1m].
7469

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

7792
```json
@@ -91,18 +106,6 @@ For Solaris, the mount entry corresponds to the 'fs' resource in the [zonecfg(1M
91106
]
92107
```
93108

94-
### Example (Windows)
95-
96-
```json
97-
"mounts": [
98-
{
99-
"destination": "C:\\folder-inside-container",
100-
"source": "C:\\folder-on-host",
101-
"options": []
102-
}
103-
]
104-
```
105-
106109
### Example (Solaris)
107110

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