Signed-off-by: xlgao-zju <xlgao@zju.edu.cn>
| ... | ... |
@@ -1260,6 +1260,19 @@ one or more `VOLUME`'s associated with an image, but only the operator |
| 1260 | 1260 |
can give access from one container to another (or from a container to a |
| 1261 | 1261 |
volume mounted on the host). |
| 1262 | 1262 |
|
| 1263 |
+The `container-dir` must always be an absolute path such as `/src/docs`. |
|
| 1264 |
+The `host-dir` can either be an absolute path or a `name` value. If you |
|
| 1265 |
+supply an absolute path for the `host-dir`, Docker bind-mounts to the path |
|
| 1266 |
+you specify. If you supply a `name`, Docker creates a named volume by that `name`. |
|
| 1267 |
+ |
|
| 1268 |
+A `name` value must start with start with an alphanumeric character, |
|
| 1269 |
+followed by `a-z0-9`, `_` (underscore), `.` (period) or `-` (hyphen). |
|
| 1270 |
+An absolute path starts with a `/` (forward slash). |
|
| 1271 |
+ |
|
| 1272 |
+For example, you can specify either `/foo` or `foo` for a `host-dir` value. |
|
| 1273 |
+If you supply the `/foo` value, Docker creates a bind-mount. If you supply |
|
| 1274 |
+the `foo` specification, Docker creates a named volume. |
|
| 1275 |
+ |
|
| 1263 | 1276 |
### USER |
| 1264 | 1277 |
|
| 1265 | 1278 |
`root` (id = 0) is the default user within a container. The image developer can |
| ... | ... |
@@ -105,6 +105,19 @@ image, the `/src/webapp` mount overlays but does not remove the pre-existing |
| 105 | 105 |
content. Once the mount is removed, the content is accessible again. This is |
| 106 | 106 |
consistent with the expected behavior of the `mount` command. |
| 107 | 107 |
|
| 108 |
+The `container-dir` must always be an absolute path such as `/src/docs`. |
|
| 109 |
+The `host-dir` can either be an absolute path or a `name` value. If you |
|
| 110 |
+supply an absolute path for the `host-dir`, Docker bind-mounts to the path |
|
| 111 |
+you specify. If you supply a `name`, Docker creates a named volume by that `name`. |
|
| 112 |
+ |
|
| 113 |
+A `name` value must start with start with an alphanumeric character, |
|
| 114 |
+followed by `a-z0-9`, `_` (underscore), `.` (period) or `-` (hyphen). |
|
| 115 |
+An absolute path starts with a `/` (forward slash). |
|
| 116 |
+ |
|
| 117 |
+For example, you can specify either `/foo` or `foo` for a `host-dir` value. |
|
| 118 |
+If you supply the `/foo` value, Docker creates a bind-mount. If you supply |
|
| 119 |
+the `foo` specification, Docker creates a named volume. |
|
| 120 |
+ |
|
| 108 | 121 |
If you are using Docker Machine on Mac or Windows, your Docker daemon has only limited access to your OS X or Windows filesystem. Docker Machine tries |
| 109 | 122 |
to auto-share your `/Users` (OS X) or `C:\Users` (Windows) directory. So, |
| 110 | 123 |
you can mount files or directories on OS X using. |
| ... | ... |
@@ -435,7 +435,20 @@ content label. Shared volume labels allow all containers to read/write content. |
| 435 | 435 |
The `Z` option tells Docker to label the content with a private unshared label. |
| 436 | 436 |
Only the current container can use a private volume. |
| 437 | 437 |
|
| 438 |
-Note: Multiple Volume options can be added separated by a "," |
|
| 438 |
+The `container-dir` must always be an absolute path such as `/src/docs`. |
|
| 439 |
+The `host-dir` can either be an absolute path or a `name` value. If you |
|
| 440 |
+supply an absolute path for the `host-dir`, Docker bind-mounts to the path |
|
| 441 |
+you specify. If you supply a `name`, Docker creates a named volume by that `name`. |
|
| 442 |
+ |
|
| 443 |
+A `name` value must start with start with an alphanumeric character, |
|
| 444 |
+followed by `a-z0-9`, `_` (underscore), `.` (period) or `-` (hyphen). |
|
| 445 |
+An absolute path starts with a `/` (forward slash). |
|
| 446 |
+ |
|
| 447 |
+For example, you can specify either `/foo` or `foo` for a `host-dir` value. |
|
| 448 |
+If you supply the `/foo` value, Docker creates a bind-mount. If you supply |
|
| 449 |
+the `foo` specification, Docker creates a named volume. |
|
| 450 |
+ |
|
| 451 |
+**Note:** Multiple Volume options can be added separated by a , (comma). |
|
| 439 | 452 |
|
| 440 | 453 |
**--volumes-from**=[] |
| 441 | 454 |
Mount volumes from the specified container(s) |