Signed-off-by: Jeremy Yallop <yallop@docker.com>
| ... | ... |
@@ -245,6 +245,9 @@ definitions: |
| 245 | 245 |
ReadOnly: |
| 246 | 246 |
description: "Whether the mount should be read-only." |
| 247 | 247 |
type: "boolean" |
| 248 |
+ Consistency: |
|
| 249 |
+ description: "The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`." |
|
| 250 |
+ type: "string" |
|
| 248 | 251 |
BindOptions: |
| 249 | 252 |
description: "Optional configuration for the `bind` type." |
| 250 | 253 |
type: "object" |
| ... | ... |
@@ -18,6 +18,7 @@ keywords: "API, Docker, rcli, REST, documentation" |
| 18 | 18 |
[Docker Engine API v1.28](https://docs.docker.com/engine/api/v1.28/) documentation |
| 19 | 19 |
|
| 20 | 20 |
|
| 21 |
+* `POST /containers/create` now includes a `Consistency` field to specify the consistency level for each `Mount`, with possible values `default`, `consistent`, `cached`, or `delegated`. |
|
| 21 | 22 |
* `GET /containers/create` now takes a `DeviceCgroupRules` field in `HostConfig` allowing to set custom device cgroup rules for the created container. |
| 22 | 23 |
* Optional query parameter `verbose` for `GET /networks/(id or name)` will now list all services with all the tasks, including the non-local tasks on the given network. |
| 23 | 24 |
* `GET /containers/(id or name)/attach/ws` now returns WebSocket in binary frame format for API version >= v1.28, and returns WebSocket in text frame format for API version< v1.28, for the purpose of backward-compatibility. |
| ... | ... |
@@ -126,7 +126,8 @@ Options: |
| 126 | 126 |
-v, --volume value Bind mount a volume (default []). The format |
| 127 | 127 |
is `[host-src:]container-dest[:<options>]`. |
| 128 | 128 |
The comma-delimited `options` are [rw|ro], |
| 129 |
- [z|Z], [[r]shared|[r]slave|[r]private], and |
|
| 129 |
+ [z|Z], [[r]shared|[r]slave|[r]private], |
|
| 130 |
+ [delegated|cached|consistent], and |
|
| 130 | 131 |
[nocopy]. The 'host-src' is an absolute path |
| 131 | 132 |
or a name value. |
| 132 | 133 |
--volume-driver string Optional volume driver for the container |
| ... | ... |
@@ -137,7 +137,8 @@ Options: |
| 137 | 137 |
-v, --volume value Bind mount a volume (default []). The format |
| 138 | 138 |
is `[host-src:]container-dest[:<options>]`. |
| 139 | 139 |
The comma-delimited `options` are [rw|ro], |
| 140 |
- [z|Z], [[r]shared|[r]slave|[r]private], and |
|
| 140 |
+ [z|Z], [[r]shared|[r]slave|[r]private], |
|
| 141 |
+ [delegated|cached|consistent], and |
|
| 141 | 142 |
[nocopy]. The 'host-src' is an absolute path |
| 142 | 143 |
or a name value. |
| 143 | 144 |
--volume-driver string Optional volume driver for the container |
| ... | ... |
@@ -320,9 +320,22 @@ volumes in a service: |
| 320 | 320 |
</ul></p> |
| 321 | 321 |
</td> |
| 322 | 322 |
</tr> |
| 323 |
+ <tr> |
|
| 324 |
+ <td><b>consistency</b></td> |
|
| 325 |
+ <td></td> |
|
| 326 |
+ <td> |
|
| 327 |
+ <p>The consistency requirements for the mount; one of |
|
| 328 |
+ <ul> |
|
| 329 |
+ <li><tt>default</tt>: Equivalent to <tt>consistent</tt>.</li> |
|
| 330 |
+ <li><tt>consistent</tt>: Full consistency. The container runtime and the host maintain an identical view of the mount at all times.</li> |
|
| 331 |
+ <li><tt>cached</tt>: The host's view of the mount is authoritative. There may be delays before updates made on the host are visible within a container.</li> |
|
| 332 |
+ <li><tt>delegated</tt>: The container runtime's view of the mount is authoritative. There may be delays before updates made in a container are are visible on the host.</li> |
|
| 333 |
+ </ul> |
|
| 334 |
+ </p> |
|
| 335 |
+ </td> |
|
| 336 |
+ </tr> |
|
| 323 | 337 |
</table> |
| 324 | 338 |
|
| 325 |
- |
|
| 326 | 339 |
#### Bind Propagation |
| 327 | 340 |
|
| 328 | 341 |
Bind propagation refers to whether or not mounts created within a given |
| ... | ... |
@@ -625,6 +625,7 @@ any options, the systems uses the following options: |
| 625 | 625 |
* [rw|ro] |
| 626 | 626 |
* [z|Z] |
| 627 | 627 |
* [`[r]shared`|`[r]slave`|`[r]private`] |
| 628 |
+ * [`delegated`|`cached`|`consistent`] |
|
| 628 | 629 |
* [nocopy] |
| 629 | 630 |
|
| 630 | 631 |
The `CONTAINER-DIR` must be an absolute path such as `/src/docs`. The `HOST-DIR` |
| ... | ... |
@@ -642,9 +643,12 @@ You can specify multiple **-v** options to mount one or more mounts to a |
| 642 | 642 |
container. To use these same mounts in other containers, specify the |
| 643 | 643 |
**--volumes-from** option also. |
| 644 | 644 |
|
| 645 |
-You can add `:ro` or `:rw` suffix to a volume to mount it read-only or |
|
| 646 |
-read-write mode, respectively. By default, the volumes are mounted read-write. |
|
| 647 |
-See examples. |
|
| 645 |
+You can supply additional options for each bind-mount following an additional |
|
| 646 |
+colon. A `:ro` or `:rw` suffix mounts a volume in read-only or read-write |
|
| 647 |
+mode, respectively. By default, volumes are mounted in read-write mode. |
|
| 648 |
+You can also specify the consistency requirement for the mount, either |
|
| 649 |
+`:consistent` (the default), `:cached`, or `:delegated`. Multiple options are |
|
| 650 |
+separated by commas, e.g. `:ro,cached`. |
|
| 648 | 651 |
|
| 649 | 652 |
Labeling systems like SELinux require that proper labels are placed on volume |
| 650 | 653 |
content mounted into a container. Without a label, the security system might |
| ... | ... |
@@ -23,9 +23,12 @@ You can specify multiple **-v** options to mount one or more mounts to a |
| 23 | 23 |
container. To use these same mounts in other containers, specify the |
| 24 | 24 |
**--volumes-from** option also. |
| 25 | 25 |
|
| 26 |
-You can add `:ro` or `:rw` suffix to a volume to mount it read-only or |
|
| 27 |
-read-write mode, respectively. By default, the volumes are mounted read-write. |
|
| 28 |
-See examples. |
|
| 26 |
+You can supply additional options for each bind-mount following an additional |
|
| 27 |
+colon. A `:ro` or `:rw` suffix mounts a volume in read-only or read-write |
|
| 28 |
+mode, respectively. By default, volumes are mounted in read-write mode. |
|
| 29 |
+You can also specify the consistency requirement for the mount, either |
|
| 30 |
+`:consistent` (the default), `:cached`, or `:delegated`. Multiple options are |
|
| 31 |
+separated by commas, e.g. `:ro,cached`. |
|
| 29 | 32 |
|
| 30 | 33 |
Labeling systems like SELinux require that proper labels are placed on volume |
| 31 | 34 |
content mounted into a container. Without a label, the security system might |