Skip to content

Commit 7bacd1d

Browse files
committed
Move CgroupnsMode feature to API v1.41
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 771fc7e commit 7bacd1d

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

api/server/router/container/container_routes.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,8 @@ func (s *containerRouter) postContainersCreate(ctx context.Context, w http.Respo
489489
if hostConfig.IpcMode.IsEmpty() {
490490
hostConfig.IpcMode = container.IpcMode("shareable")
491491
}
492-
492+
}
493+
if hostConfig != nil && versions.LessThan(version, "1.41") {
493494
// Older clients expect the default to be "host"
494495
if hostConfig.CgroupnsMode.IsEmpty() {
495496
hostConfig.CgroupnsMode = container.CgroupnsMode("host")

docs/api/version-history.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ keywords: "API, Docker, rcli, REST, documentation"
1717

1818
[Docker Engine API v1.41](https://docs.docker.com/engine/api/v1.41/) documentation
1919

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.
2025

2126

2227
## v1.40 API changes
@@ -74,11 +79,6 @@ keywords: "API, Docker, rcli, REST, documentation"
7479
* `POST /containers/{id}/update` now accepts a `PidsLimit` field to tune a container's
7580
PID limit. Set `0` or `-1` for unlimited. Leave `null` to not change the current value.
7681
* `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.
8282

8383
## V1.39 API changes
8484

0 commit comments

Comments
 (0)