From 1bf91d237107d6c04d7883907fafc732225c9495 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Fri, 20 Sep 2024 12:02:58 +0200 Subject: [PATCH] vendor: github.com/docker/cli v27.3.0 Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- .../docker/cli/docs/reference/dockerd.md | 66 ++++++++++++++++++- _vendor/modules.txt | 2 +- go.mod | 4 +- go.sum | 2 + 4 files changed, 70 insertions(+), 4 deletions(-) diff --git a/_vendor/github.com/docker/cli/docs/reference/dockerd.md b/_vendor/github.com/docker/cli/docs/reference/dockerd.md index c13c20a864..bb603c9b38 100644 --- a/_vendor/github.com/docker/cli/docs/reference/dockerd.md +++ b/_vendor/github.com/docker/cli/docs/reference/dockerd.md @@ -57,6 +57,7 @@ Options: --exec-opt list Runtime execution options --exec-root string Root directory for execution state files (default "/var/run/docker") --experimental Enable experimental features + --feature map Enable feature in the daemon --fixed-cidr string IPv4 subnet for fixed IPs --fixed-cidr-v6 string IPv6 subnet for fixed IPs -G, --group string Group for the unix socket (default "docker") @@ -79,6 +80,7 @@ Options: --label list Set key=value labels to the daemon --live-restore Enable live restore of docker when containers are still running --log-driver string Default driver for container logs (default "json-file") + --log-format string Set the logging format ("text"|"json") (default "text") -l, --log-level string Set the logging level ("debug"|"info"|"warn"|"error"|"fatal") (default "info") --log-opt map Default log driver options for containers (default map[]) --max-concurrent-downloads int Set the max concurrent downloads (default 3) @@ -890,6 +892,33 @@ Alternatively, you can set custom locations for CDI specifications using the When CDI is enabled for a daemon, you can view the configured CDI specification directories using the `docker info` command. +#### Daemon logging format + +The `--log-format` option or "log-format" option in the [daemon configuration file](#daemon-configuration-file) +lets you set the format for logs produced by the daemon. The logging format should +only be configured either through the `--log-format` command line option or +through the "log-format" field in the configuration file; using both +the command-line option and the "log-format" field in the configuration +file produces an error. If this option is not set, the default is "text". + +The following example configures the daemon through the `--log-format` command +line option to use `json` formatted logs; + +```console +$ dockerd --log-format=json +# ... +{"level":"info","msg":"API listen on /var/run/docker.sock","time":"2024-09-16T11:06:08.558145428Z"} +``` + +The following example shows a `daemon.json` configuration file with the +"log-format" set; + +```json +{ + "log-format": "json" +} +``` + ### Miscellaneous options IP masquerading uses address translation to allow containers without a public @@ -971,6 +1000,36 @@ Example of usage: } ``` +### Enable feature in the daemon (--feature) + +The `--feature` option lets you enable or disable a feature in the daemon. +This option corresponds with the "features" field in the [daemon.json configuration file](#daemon-configuration-file). +Features should only be configured either through the `--feature` command line +option or through the "features" field in the configuration file; using both +the command-line option and the "features" field in the configuration +file produces an error. The feature option can be specified multiple times +to configure multiple features. The `--feature` option accepts a name and +optional boolean value. When omitting the value, the default is `true`. + +The following example runs the daemon with the `cdi` and `containerd-snapshotter` +features enabled. The `cdi` option is provided with a value; + +```console +$ dockerd --feature cdi=true --feature containerd-snapshotter +``` + +The following example is the equivalent using the `daemon.json` configuration +file; + +```json +{ + "features": { + "cdi": true, + "containerd-snapshotter": true + } +} +``` + ### Daemon configuration file The `--config-file` option allows you to set any configuration option @@ -1065,7 +1124,10 @@ The following is a full example of the allowed configuration options on Linux: "exec-opts": [], "exec-root": "", "experimental": false, - "features": {}, + "features": { + "cdi": true, + "containerd-snapshotter": true + }, "fixed-cidr": "", "fixed-cidr-v6": "", "group": "", @@ -1089,6 +1151,7 @@ The following is a full example of the allowed configuration options on Linux: "labels": [], "live-restore": true, "log-driver": "json-file", + "log-format": "text", "log-level": "", "log-opts": { "cache-disabled": "false", @@ -1183,6 +1246,7 @@ The following is a full example of the allowed configuration options on Windows: "insecure-registries": [], "labels": [], "log-driver": "", + "log-format": "text", "log-level": "", "max-concurrent-downloads": 3, "max-concurrent-uploads": 5, diff --git a/_vendor/modules.txt b/_vendor/modules.txt index aeca34fb38..b0e7607bbc 100644 --- a/_vendor/modules.txt +++ b/_vendor/modules.txt @@ -1,6 +1,6 @@ # github.com/moby/moby v27.3.0+incompatible # github.com/moby/buildkit v0.16.0 # github.com/docker/buildx v0.17.0 -# github.com/docker/cli v27.2.2-0.20240909090509-65decb573126+incompatible +# github.com/docker/cli v27.3.0+incompatible # github.com/docker/compose/v2 v2.29.6 # github.com/docker/scout-cli v1.13.0 diff --git a/go.mod b/go.mod index 97090d1fdf..4e12cb7df3 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ toolchain go1.22.5 require ( github.com/docker/buildx v0.17.0 // indirect - github.com/docker/cli v27.2.2-0.20240909090509-65decb573126+incompatible // indirect + github.com/docker/cli v27.3.0+incompatible // indirect github.com/docker/compose/v2 v2.29.6 // indirect github.com/docker/scout-cli v1.13.0 // indirect github.com/moby/buildkit v0.16.0 // indirect @@ -15,7 +15,7 @@ require ( replace ( github.com/docker/buildx => github.com/docker/buildx v0.17.0 - github.com/docker/cli => github.com/docker/cli v27.2.2-0.20240909090509-65decb573126+incompatible + github.com/docker/cli => github.com/docker/cli v27.3.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.16.0 diff --git a/go.sum b/go.sum index 17f30651e5..a85e0d5ab8 100644 --- a/go.sum +++ b/go.sum @@ -122,6 +122,8 @@ github.com/docker/cli v27.2.0+incompatible h1:yHD1QEB1/0vr5eBNpu8tncu8gWxg8EydFP github.com/docker/cli v27.2.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v27.2.2-0.20240909090509-65decb573126+incompatible h1:if+XpfWkGSpLf8NtVlYgvCeVvKW4Eba90LispMGC50M= github.com/docker/cli v27.2.2-0.20240909090509-65decb573126+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v27.3.0+incompatible h1:h7J5eiGdUbH2Q4EcGr1mFb20qzS7Nrot3EI9hwycpK0= +github.com/docker/cli v27.3.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=