Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -489,7 +489,8 @@ func (s *containerRouter) postContainersCreate(ctx context.Context, w http.Respo |
| 489 | 489 |
if hostConfig.IpcMode.IsEmpty() {
|
| 490 | 490 |
hostConfig.IpcMode = container.IpcMode("shareable")
|
| 491 | 491 |
} |
| 492 |
- |
|
| 492 |
+ } |
|
| 493 |
+ if hostConfig != nil && versions.LessThan(version, "1.41") {
|
|
| 493 | 494 |
// Older clients expect the default to be "host" |
| 494 | 495 |
if hostConfig.CgroupnsMode.IsEmpty() {
|
| 495 | 496 |
hostConfig.CgroupnsMode = container.CgroupnsMode("host")
|
| ... | ... |
@@ -17,6 +17,11 @@ keywords: "API, Docker, rcli, REST, documentation" |
| 17 | 17 |
|
| 18 | 18 |
[Docker Engine API v1.41](https://docs.docker.com/engine/api/v1.41/) documentation |
| 19 | 19 |
|
| 20 |
+* `POST /containers/create` on Linux now accepts the `HostConfig.CgroupnsMode` property. |
|
| 21 |
+ Set the property to `host` to create the container in the daemon's cgroup namespace, or |
|
| 22 |
+ `private` to create the container in its own private cgroup namespace. The per-daemon |
|
| 23 |
+ default is `host`, and can be changed by using the`CgroupNamespaceMode` daemon configuration |
|
| 24 |
+ parameter. |
|
| 20 | 25 |
|
| 21 | 26 |
|
| 22 | 27 |
## v1.40 API changes |
| ... | ... |
@@ -74,11 +79,6 @@ keywords: "API, Docker, rcli, REST, documentation" |
| 74 | 74 |
* `POST /containers/{id}/update` now accepts a `PidsLimit` field to tune a container's
|
| 75 | 75 |
PID limit. Set `0` or `-1` for unlimited. Leave `null` to not change the current value. |
| 76 | 76 |
* `POST /build` now accepts `outputs` key for configuring build outputs when using BuildKit mode. |
| 77 |
-* `POST /containers/create` on Linux now accepts the `HostConfig.CgroupnsMode` property. |
|
| 78 |
- Set the property to `host` to create the container in the daemon's cgroup namespace, or |
|
| 79 |
- `private` to create the container in its own private cgroup namespace. The per-daemon |
|
| 80 |
- default is `host`, and can be changed by using the`CgroupNamespaceMode` daemon configuration |
|
| 81 |
- parameter. |
|
| 82 | 77 |
|
| 83 | 78 |
## V1.39 API changes |
| 84 | 79 |
|