--oom-kill-disable warnings on docker run / docker create
This warning was originally added in [moby@3aa70c1], and moved to be printed on both `run` and `create` in commit7c514a31c9. However, [moby@57f1305] (docker 19.03, API 1.40) moved such warnings to the daemon side. The patch mentioned this issue: > This patch will have one side-effect; docker cli's that also perform this check > client-side will print the warning twice; this can be addressed by disabling > the cli-side check for newer API versions, but will generate a bit of extra > noise when using an older CLI. The CLI does not take this into account currently, and still prints warnings twice; even in cases where the option is not supported by the daemon, and discarded: On a host without OomKillDisable support: docker create --oom-kill-disable alpine WARNING: Disabling the OOM killer on containers without setting a '-m/--memory' limit may be dangerous. WARNING: Your kernel does not support OomKillDisable. OomKillDisable discarded. On a host that supports it: docker create --oom-kill-disable alpine WARNING: Disabling the OOM killer on containers without setting a '-m/--memory' limit may be dangerous. WARNING: OOM killer is disabled for the container, but no memory limit is set, this can result in the system running out of resources. This patch removes the client-side warning, leaving it to the daemon to report if any warnings should produced (and the client to print them). With this patch applied: On a host without OomKillDisable support: docker create --oom-kill-disable alpine WARNING: Your kernel does not support OomKillDisable. OomKillDisable discarded. On a host that supports it: docker create --oom-kill-disable alpine WARNING: OOM killer is disabled for the container, but no memory limit is set, this can result in the system running out of resources. [moby@3aa70c1]:3aa70c1948[moby@57f1305]:57f1305e74Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Docker CLI
About
This repository is the home of the Docker CLI.
Development
docker/cli is developed using Docker.
Build CLI from source:
docker buildx bake
Build binaries for all supported platforms:
docker buildx bake cross
Build for a specific platform:
docker buildx bake --set binary.platform=linux/arm64
Build dynamic binary for glibc or musl:
USE_GLIBC=1 docker buildx bake dynbinary
Run all linting:
docker buildx bake lint shellcheck
Run test:
docker buildx bake test
List all the available targets:
make help
In-container development environment
Start an interactive development environment:
make -f docker.Makefile shell
Legal
Brought to you courtesy of our legal counsel. For more context, see the NOTICE document in this repo.
Use and transfer of Docker may be subject to certain restrictions by the United States and other governments.
It is your responsibility to ensure that your use and/or transfer does not violate applicable laws.
For more information, see https://www.bis.doc.gov
Licensing
docker/cli is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.