vendor: github.com/docker/cli v27.2.0

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
David Karlsson 2024-08-28 10:45:51 +02:00
parent fc48fcd51f
commit 2660886a2c
10 changed files with 57 additions and 72 deletions

View File

@ -562,8 +562,7 @@ Docker API v1.42 and up now ignores this option when set. Older versions of the
API continue to accept the option, but depending on the OCI runtime used, may
take no effect.
> **Note**
>
> [!NOTE]
> While not deprecated (yet) in Docker, the OCI runtime specification also
> deprecated the `memory.kmem.tcp.limit_in_bytes` option. When using `runc` as
> runtime, this option takes no effect. The linux kernel did not explicitly

View File

@ -16,8 +16,7 @@ plugins using Docker Engine.
For information about legacy (non-managed) plugins, refer to
[Understand legacy Docker Engine plugins](legacy_plugins.md).
> **Note**
>
> [!NOTE]
> Docker Engine managed plugins are currently not supported on Windows daemons.
## Installing and using a plugin
@ -38,8 +37,7 @@ operation, such as creating a volume.
In the following example, you install the `sshfs` plugin, verify that it is
enabled, and use it to create a volume.
> **Note**
>
> [!NOTE]
> This example is intended for instructional purposes only. Once the volume is
> created, your SSH password to the remote host is exposed as plaintext when
> inspecting the volume. Delete the volume as soon as you are done with the
@ -126,8 +124,7 @@ commands and options, see the
The `rootfs` directory represents the root filesystem of the plugin. In this
example, it was created from a Dockerfile:
> **Note**
>
> [!NOTE]
> The `/run/docker/plugins` directory is mandatory inside of the
> plugin's filesystem for Docker to communicate with the plugin.

View File

@ -43,8 +43,7 @@ Authorization plugins must follow the rules described in [Docker Plugin API](plu
Each plugin must reside within directories described under the
[Plugin discovery](plugin_api.md#plugin-discovery) section.
> **Note**
>
> [!NOTE]
> The abbreviations `AuthZ` and `AuthN` mean authorization and authentication
> respectively.

View File

@ -8,8 +8,7 @@ Docker exposes internal metrics based on the Prometheus format. Metrics plugins
enable accessing these metrics in a consistent way by providing a Unix
socket at a predefined path where the plugin can scrape the metrics.
> **Note**
>
> [!NOTE]
> While the plugin interface for metrics is non-experimental, the naming of the
> metrics and metric labels is still considered experimental and may change in a
> future version.

View File

@ -80,8 +80,7 @@ provide the Docker Daemon with writeable paths on the host filesystem. The Docke
daemon provides these paths to containers to consume. The Docker daemon makes
the volumes available by bind-mounting the provided paths into the containers.
> **Note**
>
> [!NOTE]
> Volume plugins should *not* write data to the `/var/lib/docker/` directory,
> including `/var/lib/docker/volumes`. The `/var/lib/docker/` directory is
> reserved for Docker.

View File

@ -124,6 +124,7 @@ type `dockerd`.
To run the daemon with debug output, use `dockerd --debug` or add `"debug": true`
to [the `daemon.json` file](#daemon-configuration-file).
> [!NOTE]
> **Enabling experimental features**
>
> Enable experimental features by starting `dockerd` with the `--experimental`
@ -133,7 +134,7 @@ to [the `daemon.json` file](#daemon-configuration-file).
The following list of environment variables are supported by the `dockerd` daemon.
Some of these environment variables are supported both by the Docker Daemon and
the `docker` CLI. Refer to [Environment variables](https://docs.docker.com/engine/reference/commandline/cli/#environment-variables)
the `docker` CLI. Refer to [Environment variables](https://docs.docker.com/reference/cli/docker/#environment-variables)
to learn about environment variables supported by the `docker` CLI.
| Variable | Description |
@ -152,8 +153,7 @@ to learn about environment variables supported by the `docker` CLI.
### Proxy configuration
> **Note**
>
> [!NOTE]
> Refer to the [Docker Desktop manual](https://docs.docker.com/desktop/networking/#httphttps-proxy-support)
> if you are running [Docker Desktop](https://docs.docker.com/desktop/).
@ -169,7 +169,7 @@ in three ways:
options. (Docker Engine version 23.0 or later).
The command-line and configuration file options take precedence over environment
variables. Refer to [control and configure Docker with systemd](https://docs.docker.com/config/daemon/systemd/#httphttps-proxy)
variables. Refer to [control and configure Docker with systemd](https://docs.docker.com/engine/daemon/proxy/)
to set these environment variables on a host using `systemd`.
### Daemon socket option
@ -191,8 +191,7 @@ interface using its IP address: `-H tcp://192.168.59.103:2375`. It is
conventional to use port `2375` for un-encrypted, and port `2376` for encrypted
communication with the daemon.
> **Note**
>
> [!NOTE]
> If you're using an HTTPS encrypted socket, keep in mind that only
> TLS version 1.0 and higher is supported. Protocols SSLv3 and below are not
> supported for security reasons.
@ -259,8 +258,7 @@ supported. If your key is protected with passphrase, you need to set up
#### Bind Docker to another host/port or a Unix socket
> **Warning**
>
> [!WARNING]
> Changing the default `docker` daemon binding to a TCP port or Unix `docker`
> user group introduces security risks, as it may allow non-root users to gain
> root access on the host. Make sure you control access to `docker`. If you are
@ -332,7 +330,7 @@ drivers: `overlay2`, `fuse-overlayfs`, `btrfs`, and `zfs`.
and is selected by default. Unless users have a strong reason to prefer another storage driver,
`overlay2` should be used.
You can find out more about storage drivers and how to select one in [Select a storage driver](https://docs.docker.com/storage/storagedriver/select-storage-driver/).
You can find out more about storage drivers and how to select one in [Select a storage driver](https://docs.docker.com/engine/storage/drivers/select-storage-driver/).
On Windows, the Docker daemon only supports the `windowsfilter` storage driver.
@ -424,7 +422,7 @@ installed outside of `PATH`, must be registered with the daemon, either via the
configuration file or using the `--add-runtime` command line flag.
For examples on how to use other container runtimes, see
[Alternative container runtimes](https://docs.docker.com/engine/alternative-runtimes/)
[Alternative container runtimes](https://docs.docker.com/engine/daemon/alternative-runtimes/)
##### Configure runtimes using `daemon.json`
@ -609,7 +607,7 @@ $ sudo dockerd --add-runtime <runtime>=<path>
Defining runtime arguments via the command line is not supported.
For an example configuration for a runc drop-in replacment, see
[Alternative container runtimes > youki](https://docs.docker.com/engine/alternative-runtimes/#youki)
[Alternative container runtimes > youki](https://docs.docker.com/engine/daemon/alternative-runtimes/#youki)
##### Configure the default container runtime
@ -709,8 +707,7 @@ This option is useful when pushing images containing non-distributable artifacts
to a registry on an air-gapped network so hosts on that network can pull the
images without connecting to another server.
> **Warning**
>
> [!WARNING]
> Non-distributable artifacts typically have restrictions on how
> and where they can be distributed and shared. Only use this feature to push
> artifacts to private registries and ensure that you are in compliance with
@ -783,7 +780,7 @@ Docker host's configuration:
This only adds the proxy and authentication to the Docker daemon's requests.
To use the proxy when building images and running containers, see
[Configure Docker to use a proxy server](https://docs.docker.com/network/proxy/)
[Configure Docker to use a proxy server](https://docs.docker.com/engine/cli/proxy/)
### Default `ulimit` settings
@ -858,8 +855,7 @@ PING host.docker.internal (192.0.2.0): 56 data bytes
### Enable CDI devices
> **Note**
>
> [!NOTE]
> This is experimental feature and as such doesn't represent a stable API.
>
> This feature isn't enabled by default. To this feature, set `features.cdi` to
@ -952,7 +948,7 @@ to avoid collisions with other Prometheus exporters and services.
If you are running a Prometheus server you can add this address to your scrape configs
to have Prometheus collect metrics on Docker. For more information, see
[Collect Docker metrics with Prometheus](https://docs.docker.com/config/daemon/prometheus/).
[Collect Docker metrics with Prometheus](https://docs.docker.com/engine/daemon/prometheus/).
#### Node generic resources
@ -1145,13 +1141,12 @@ The following is a full example of the allowed configuration options on Linux:
}
```
> **Note**
>
> [!NOTE]
> You can't set options in `daemon.json` that have already been set on
> daemon startup as a flag.
> On systems that use systemd to start the Docker daemon, `-H` is already set, so
> you can't use the `hosts` key in `daemon.json` to add listening addresses.
> See [custom Docker daemon options](https://docs.docker.com/config/daemon/systemd/#custom-docker-daemon-options)
> See [custom Docker daemon options](https://docs.docker.com/engine/daemon/proxy/#systemd-unit-file)
> for an example on how to configure the daemon using systemd drop-in files.
##### On Windows
@ -1234,7 +1229,7 @@ The list of feature options include:
- `containerd-snapshotter`: when set to `true`, the daemon uses containerd
snapshotters instead of the classic storage drivers for storing image and
container data. For more information, see
[containerd storage](https://docs.docker.com/storage/containerd/).
[containerd storage](https://docs.docker.com/engine/storage/containerd/).
- `windows-dns-proxy`: when set to `true`, the daemon's internal DNS resolver
will forward requests to external servers. Without this, most applications
running in the container will still be able to use secondary DNS servers
@ -1242,7 +1237,7 @@ The list of feature options include:
external names. The current default is `false`, it will change to `true` in
a future release. This option is only allowed on Windows.
> **Warning**
> [!WARNING]
> The `windows-dns-proxy` feature flag will be removed in a future release.
#### Configuration reload behavior
@ -1260,7 +1255,7 @@ The list of currently supported options that can be reconfigured is this:
| ---------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `debug` | Toggles debug mode of the daemon. |
| `labels` | Replaces the daemon labels with a new set of labels. |
| `live-restore` | Toggles [live restore](https://docs.docker.com/config/containers/live-restore/). |
| `live-restore` | Toggles [live restore](https://docs.docker.com/engine/containers/live-restore/). |
| `max-concurrent-downloads` | Configures the max concurrent downloads for each pull. |
| `max-concurrent-uploads` | Configures the max concurrent uploads for each push. |
| `max-download-attempts` | Configures the max download attempts for each pull. |
@ -1275,8 +1270,7 @@ The list of currently supported options that can be reconfigured is this:
### Run multiple daemons
> **Note**
>
> [!NOTE]
> Running multiple daemons on a single host is considered experimental.
> You may encounter unsolved problems, and things may not work as expected in some cases.
@ -1362,7 +1356,7 @@ using the `daemon.json` file.
```
This example uses the `bridge` network driver. Refer to the
[bridge network driver page](https://docs.docker.com/network/drivers/bridge/#options)
[bridge network driver page](https://docs.docker.com/engine/network/drivers/bridge/#options)
for an overview of available driver options.
After changing the configuration and restarting the daemon, new networks that

View File

@ -35,7 +35,7 @@ reference to create or run a container based on an image.
An image tag is the image version, which defaults to `latest` when omitted. Use
the tag to run a container from specific version of an image. For example, to
run version `23.10` of the `ubuntu` image: `docker run ubuntu:23.10`.
run version `24.04` of the `ubuntu` image: `docker run ubuntu:24.04`.
#### Image digests
@ -69,8 +69,7 @@ to start an interactive shell in the container (if the image you select has an
$ docker run -it IMAGE sh
```
> **Note**
>
> [!NOTE]
> Depending on your Docker system configuration, you may be
> required to preface the `docker run` command with `sudo`. To avoid
> having to use `sudo` with the `docker` command, your system
@ -400,14 +399,14 @@ We have four ways to set user memory usage:
Examples:
```console
$ docker run -it ubuntu:22.04 /bin/bash
$ docker run -it ubuntu:24.04 /bin/bash
```
We set nothing about memory, this means the processes in the container can use
as much memory and swap memory as they need.
```console
$ docker run -it -m 300M --memory-swap -1 ubuntu:22.04 /bin/bash
$ docker run -it -m 300M --memory-swap -1 ubuntu:24.04 /bin/bash
```
We set memory limit and disabled swap memory limit, this means the processes in
@ -415,7 +414,7 @@ the container can use 300M memory and as much swap memory as they need (if the
host supports swap memory).
```console
$ docker run -it -m 300M ubuntu:22.04 /bin/bash
$ docker run -it -m 300M ubuntu:24.04 /bin/bash
```
We set memory limit only, this means the processes in the container can use
@ -424,7 +423,7 @@ We set memory limit only, this means the processes in the container can use
would be 2*300M, so processes can use 300M swap memory as well.
```console
$ docker run -it -m 300M --memory-swap 1G ubuntu:22.04 /bin/bash
$ docker run -it -m 300M --memory-swap 1G ubuntu:24.04 /bin/bash
```
We set both memory and swap memory, so the processes in the container can use
@ -450,7 +449,7 @@ The following example limits the memory (`-m`) to 500M and sets the memory
reservation to 200M.
```console
$ docker run -it -m 500M --memory-reservation 200M ubuntu:22.04 /bin/bash
$ docker run -it -m 500M --memory-reservation 200M ubuntu:24.04 /bin/bash
```
Under this configuration, when the container consumes memory more than 200M and
@ -460,7 +459,7 @@ memory below 200M.
The following example set memory reservation to 1G without a hard memory limit.
```console
$ docker run -it --memory-reservation 1G ubuntu:22.04 /bin/bash
$ docker run -it --memory-reservation 1G ubuntu:24.04 /bin/bash
```
The container can use as much memory as it needs. The memory reservation setting
@ -478,13 +477,13 @@ The following example limits the memory to 100M and disables the OOM killer for
this container:
```console
$ docker run -it -m 100M --oom-kill-disable ubuntu:22.04 /bin/bash
$ docker run -it -m 100M --oom-kill-disable ubuntu:24.04 /bin/bash
```
The following example, illustrates a dangerous way to use the flag:
```console
$ docker run -it --oom-kill-disable ubuntu:22.04 /bin/bash
$ docker run -it --oom-kill-disable ubuntu:24.04 /bin/bash
```
The container has unlimited memory which can cause the host to run out memory
@ -554,14 +553,14 @@ limit and "K" the kernel limit. There are three possible ways to set limits:
Examples:
```console
$ docker run -it -m 500M --kernel-memory 50M ubuntu:22.04 /bin/bash
$ docker run -it -m 500M --kernel-memory 50M ubuntu:24.04 /bin/bash
```
We set memory and kernel memory, so the processes in the container can use
500M memory in total, in this 500M memory, it can be 50M kernel memory tops.
```console
$ docker run -it --kernel-memory 50M ubuntu:22.04 /bin/bash
$ docker run -it --kernel-memory 50M ubuntu:24.04 /bin/bash
```
We set kernel memory without **-m**, so the processes in the container can
@ -578,7 +577,7 @@ between 0 and 100. A value of 0 turns off anonymous page swapping. A value of
For example, you can set:
```console
$ docker run -it --memory-swappiness=0 ubuntu:22.04 /bin/bash
$ docker run -it --memory-swappiness=0 ubuntu:24.04 /bin/bash
```
Setting the `--memory-swappiness` option is helpful when you want to retain the
@ -629,7 +628,7 @@ And usually `--cpu-period` should work with `--cpu-quota`.
Examples:
```console
$ docker run -it --cpu-period=50000 --cpu-quota=25000 ubuntu:22.04 /bin/bash
$ docker run -it --cpu-period=50000 --cpu-quota=25000 ubuntu:24.04 /bin/bash
```
If there is 1 CPU, this means the container can get 50% CPU worth of run-time every 50ms.
@ -650,13 +649,13 @@ We can set cpus in which to allow execution for containers.
Examples:
```console
$ docker run -it --cpuset-cpus="1,3" ubuntu:22.04 /bin/bash
$ docker run -it --cpuset-cpus="1,3" ubuntu:24.04 /bin/bash
```
This means processes in container can be executed on cpu 1 and cpu 3.
```console
$ docker run -it --cpuset-cpus="0-2" ubuntu:22.04 /bin/bash
$ docker run -it --cpuset-cpus="0-2" ubuntu:24.04 /bin/bash
```
This means processes in container can be executed on cpu 0, cpu 1 and cpu 2.
@ -667,14 +666,14 @@ on NUMA systems.
Examples:
```console
$ docker run -it --cpuset-mems="1,3" ubuntu:22.04 /bin/bash
$ docker run -it --cpuset-mems="1,3" ubuntu:24.04 /bin/bash
```
This example restricts the processes in the container to only use memory from
memory nodes 1 and 3.
```console
$ docker run -it --cpuset-mems="0-2" ubuntu:22.04 /bin/bash
$ docker run -it --cpuset-mems="0-2" ubuntu:24.04 /bin/bash
```
This example restricts the processes in the container to only use memory from
@ -696,8 +695,7 @@ By default, all containers get the same proportion of block IO bandwidth
container's blkio weight relative to the weighting of all other running
containers using the `--blkio-weight` flag.
> **Note:**
>
> [!NOTE]
> The blkio weight setting is only available for direct IO. Buffered IO is not
> currently supported.
@ -706,8 +704,8 @@ For example, the commands below create two containers with different blkio
weight:
```console
$ docker run -it --name c1 --blkio-weight 300 ubuntu:22.04 /bin/bash
$ docker run -it --name c2 --blkio-weight 600 ubuntu:22.04 /bin/bash
$ docker run -it --name c1 --blkio-weight 300 ubuntu:24.04 /bin/bash
$ docker run -it --name c2 --blkio-weight 600 ubuntu:24.04 /bin/bash
```
If you do block IO in the two containers at the same time, by, for example:
@ -923,11 +921,11 @@ For interacting with the network stack, instead of using `--privileged` they
should use `--cap-add=NET_ADMIN` to modify the network interfaces.
```console
$ docker run -it --rm ubuntu:22.04 ip link add dummy0 type dummy
$ docker run -it --rm ubuntu:24.04 ip link add dummy0 type dummy
RTNETLINK answers: Operation not permitted
$ docker run -it --rm --cap-add=NET_ADMIN ubuntu:22.04 ip link add dummy0 type dummy
$ docker run -it --rm --cap-add=NET_ADMIN ubuntu:24.04 ip link add dummy0 type dummy
```
To mount a FUSE based filesystem, you need to combine both `--cap-add` and
@ -1039,8 +1037,7 @@ You can reset a containers entrypoint by passing an empty string, for example:
$ docker run -it --entrypoint="" mysql bash
```
> **Note**
>
> [!NOTE]
> Passing `--entrypoint` clears out any default command set on the image. That
> is, any `CMD` instruction in the Dockerfile used to build it.
@ -1223,8 +1220,7 @@ The followings examples are all valid:
--user=[ user | user:group | uid | uid:gid | user:gid | uid:group ]
```
> **Note**
>
> [!NOTE]
> If you pass a numeric user ID, it must be in the range of 0-2147483647. If
> you pass a username, the user must exist in the container.

View File

@ -1,6 +1,6 @@
# github.com/moby/moby v27.2.0+incompatible
# github.com/moby/buildkit v0.15.1
# github.com/docker/buildx v0.16.2
# github.com/docker/cli v27.1.1+incompatible
# github.com/docker/cli v27.2.0+incompatible
# github.com/docker/compose/v2 v2.29.2
# github.com/docker/scout-cli v1.13.0

4
go.mod
View File

@ -6,7 +6,7 @@ toolchain go1.22.5
require (
github.com/docker/buildx v0.16.2 // indirect
github.com/docker/cli v27.1.1+incompatible // indirect
github.com/docker/cli v27.2.0+incompatible // indirect
github.com/docker/compose/v2 v2.29.2 // indirect
github.com/docker/scout-cli v1.13.0 // indirect
github.com/moby/buildkit v0.15.1 // indirect
@ -15,7 +15,7 @@ require (
replace (
github.com/docker/buildx => github.com/docker/buildx v0.16.2
github.com/docker/cli => github.com/docker/cli v27.1.1+incompatible
github.com/docker/cli => github.com/docker/cli v27.2.0+incompatible
github.com/docker/compose/v2 => github.com/docker/compose/v2 v2.29.2
github.com/docker/scout-cli => github.com/docker/scout-cli v1.13.0
github.com/moby/buildkit => github.com/moby/buildkit v0.15.1

2
go.sum
View File

@ -116,6 +116,8 @@ github.com/docker/cli v27.0.3+incompatible h1:usGs0/BoBW8MWxGeEtqPMkzOY56jZ6kYlS
github.com/docker/cli v27.0.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/cli v27.1.1+incompatible h1:goaZxOqs4QKxznZjjBWKONQci/MywhtRv2oNn0GkeZE=
github.com/docker/cli v27.1.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/cli v27.2.0+incompatible h1:yHD1QEB1/0vr5eBNpu8tncu8gWxg8EydFPOSKHzXSMM=
github.com/docker/cli v27.2.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/compose-cli v1.0.35 h1:uZyEHLalfqBS2PiTpA1LAULyJmuQ+YtZg7nG4Xl3/Cc=
github.com/docker/compose-cli v1.0.35/go.mod h1:mSXI4hFLpRU3EtI8NTo32bNwI0UXSr8jnq+/rYjGAUU=
github.com/docker/compose/v2 v2.22.0 h1:3rRz4L7tPU75wRsV8JZh2/aTgerQvPa1cpzZN+tHqUY=