diff --git a/api/client/info.go b/api/client/info.go index 0a55f3bd52..2d02af3a58 100644 --- a/api/client/info.go +++ b/api/client/info.go @@ -105,6 +105,9 @@ func (cli *DockerCli) CmdInfo(args ...string) error { if !info.SwapLimit { fmt.Fprintln(cli.err, "WARNING: No swap limit support") } + if !info.KernelMemory { + fmt.Fprintln(cli.err, "WARNING: No kernel memory limit support") + } if !info.OomKillDisable { fmt.Fprintln(cli.err, "WARNING: No oom kill disable support") } diff --git a/daemon/info.go b/daemon/info.go index e0edc2ad22..04607fe241 100644 --- a/daemon/info.go +++ b/daemon/info.go @@ -111,6 +111,7 @@ func (daemon *Daemon) SystemInfo() (*types.Info, error) { if runtime.GOOS != "windows" { v.MemoryLimit = sysInfo.MemoryLimit v.SwapLimit = sysInfo.SwapLimit + v.KernelMemory = sysInfo.KernelMemory v.OomKillDisable = sysInfo.OomKillDisable v.CPUCfsPeriod = sysInfo.CPUCfsPeriod v.CPUCfsQuota = sysInfo.CPUCfsQuota diff --git a/docs/reference/api/docker_remote_api.md b/docs/reference/api/docker_remote_api.md index 715e8fede3..a4a07ef4b6 100644 --- a/docs/reference/api/docker_remote_api.md +++ b/docs/reference/api/docker_remote_api.md @@ -122,6 +122,7 @@ This section lists each version from latest to oldest. Each listing includes a * `POST /containers/(name)/update` now supports updating container's restart policy. * `POST /networks/create` now supports enabling ipv6 on the network by setting the `EnableIPv6` field (doing this with a label will no longer work). * `GET /info` now returns `CgroupDriver` field showing what cgroup driver the daemon is using; `cgroupfs` or `systemd`. +* `GET /info` now returns `KernelMemory` field, showing if "kernel memory limit" is supported. ### v1.22 API changes diff --git a/docs/reference/api/docker_remote_api_v1.23.md b/docs/reference/api/docker_remote_api_v1.23.md index 3617e54cff..2f4a66a0fb 100644 --- a/docs/reference/api/docker_remote_api_v1.23.md +++ b/docs/reference/api/docker_remote_api_v1.23.md @@ -2161,6 +2161,7 @@ Display system-wide information "IndexServerAddress": "https://index.docker.io/v1/", "InitPath": "/usr/bin/docker", "InitSha1": "", + "KernelMemory": true, "KernelVersion": "3.12.0-1-amd64", "Labels": [ "storage=ssd"