From 6b99e0370c2c1cb7c0d986d4406465090015b93d Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sat, 29 Jun 2024 00:06:35 +0200 Subject: [PATCH 01/50] vendor: github.com/docker/docker v27.0.3 full diff: https://github.com/docker/docker/compare/v27.0.2...v27.0.3 Signed-off-by: Sebastiaan van Stijn (cherry picked from commit 2e6aaf05d443e7c1bb1ce4fd9ba10f133f1a901f) Signed-off-by: Sebastiaan van Stijn --- vendor.mod | 2 +- vendor.sum | 4 +-- .../docker/docker/pkg/archive/archive.go | 25 +++++++++---------- .../docker/pkg/archive/archive_linux.go | 9 +++---- .../docker/pkg/archive/archive_other.go | 4 +-- .../docker/docker/pkg/archive/archive_unix.go | 13 ++++------ vendor/modules.txt | 2 +- 7 files changed, 26 insertions(+), 33 deletions(-) diff --git a/vendor.mod b/vendor.mod index 1e8df33a7c9d..3fc88579b1e0 100644 --- a/vendor.mod +++ b/vendor.mod @@ -12,7 +12,7 @@ require ( github.com/creack/pty v1.1.21 github.com/distribution/reference v0.6.0 github.com/docker/distribution v2.8.3+incompatible - github.com/docker/docker v27.0.2+incompatible + github.com/docker/docker v27.0.3+incompatible github.com/docker/docker-credential-helpers v0.8.2 github.com/docker/go-connections v0.5.0 github.com/docker/go-units v0.5.0 diff --git a/vendor.sum b/vendor.sum index a10e2c966411..e7b8d1b48b4b 100644 --- a/vendor.sum +++ b/vendor.sum @@ -57,8 +57,8 @@ github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5 github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v27.0.2+incompatible h1:mNhCtgXNV1fIRns102grG7rdzIsGGCq1OlOD0KunZos= -github.com/docker/docker v27.0.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v27.0.3+incompatible h1:aBGI9TeQ4MPlhquTQKq9XbK79rKFVwXNUAYz9aXyEBE= +github.com/docker/docker v27.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.8.2 h1:bX3YxiGzFP5sOXWc3bTPEXdEaZSeVMrFgOr3T+zrFAo= github.com/docker/docker-credential-helpers v0.8.2/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M= github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0= diff --git a/vendor/github.com/docker/docker/pkg/archive/archive.go b/vendor/github.com/docker/docker/pkg/archive/archive.go index 61b7234a0485..cde64f08ebc1 100644 --- a/vendor/github.com/docker/docker/pkg/archive/archive.go +++ b/vendor/github.com/docker/docker/pkg/archive/archive.go @@ -20,7 +20,6 @@ import ( "syscall" "time" - "github.com/containerd/containerd/pkg/userns" "github.com/containerd/log" "github.com/docker/docker/pkg/idtools" "github.com/docker/docker/pkg/ioutils" @@ -675,9 +674,11 @@ func createTarFile(path, extractDir string, hdr *tar.Header, reader io.Reader, o inUserns, bestEffortXattrs bool chownOpts *idtools.Identity ) + + // TODO(thaJeztah): make opts a required argument. if opts != nil { Lchown = !opts.NoLchown - inUserns = opts.InUserNS + inUserns = opts.InUserNS // TODO(thaJeztah): consider deprecating opts.InUserNS and detect locally. chownOpts = opts.ChownOpts bestEffortXattrs = opts.BestEffortXattrs } @@ -712,6 +713,7 @@ func createTarFile(path, extractDir string, hdr *tar.Header, reader io.Reader, o case tar.TypeBlock, tar.TypeChar: if inUserns { // cannot create devices in a userns + log.G(context.TODO()).WithFields(log.Fields{"path": path, "type": hdr.Typeflag}).Debug("skipping device nodes in a userns") return nil } // Handle this is an OS-specific way @@ -722,6 +724,11 @@ func createTarFile(path, extractDir string, hdr *tar.Header, reader io.Reader, o case tar.TypeFifo: // Handle this is an OS-specific way if err := handleTarTypeBlockCharFifo(hdr, path); err != nil { + if inUserns && errors.Is(err, syscall.EPERM) { + // In most cases, cannot create a fifo if running in user namespace + log.G(context.TODO()).WithFields(log.Fields{"error": err, "path": path, "type": hdr.Typeflag}).Debug("creating fifo node in a userns") + return nil + } return err } @@ -765,7 +772,7 @@ func createTarFile(path, extractDir string, hdr *tar.Header, reader io.Reader, o } if err := os.Lchown(path, chownOpts.UID, chownOpts.GID); err != nil { msg := "failed to Lchown %q for UID %d, GID %d" - if errors.Is(err, syscall.EINVAL) && userns.RunningInUserNS() { + if inUserns && errors.Is(err, syscall.EINVAL) { msg += " (try increasing the number of subordinate IDs in /etc/subuid and /etc/subgid)" } return errors.Wrapf(err, msg, path, hdr.Uid, hdr.Gid) @@ -871,11 +878,6 @@ func NewTarballer(srcPath string, options *TarOptions) (*Tarballer, error) { return nil, err } - whiteoutConverter, err := getWhiteoutConverter(options.WhiteoutFormat, options.InUserNS) - if err != nil { - return nil, err - } - return &Tarballer{ // Fix the source path to work with long path names. This is a no-op // on platforms other than Windows. @@ -885,7 +887,7 @@ func NewTarballer(srcPath string, options *TarOptions) (*Tarballer, error) { pipeReader: pipeReader, pipeWriter: pipeWriter, compressWriter: compressWriter, - whiteoutConverter: whiteoutConverter, + whiteoutConverter: getWhiteoutConverter(options.WhiteoutFormat), }, nil } @@ -1080,10 +1082,7 @@ func Unpack(decompressedArchive io.Reader, dest string, options *TarOptions) err defer pools.BufioReader32KPool.Put(trBuf) var dirs []*tar.Header - whiteoutConverter, err := getWhiteoutConverter(options.WhiteoutFormat, options.InUserNS) - if err != nil { - return err - } + whiteoutConverter := getWhiteoutConverter(options.WhiteoutFormat) // Iterate through the files in the archive. loop: diff --git a/vendor/github.com/docker/docker/pkg/archive/archive_linux.go b/vendor/github.com/docker/docker/pkg/archive/archive_linux.go index 93a615c59fc8..45ac2aa6ce48 100644 --- a/vendor/github.com/docker/docker/pkg/archive/archive_linux.go +++ b/vendor/github.com/docker/docker/pkg/archive/archive_linux.go @@ -12,14 +12,11 @@ import ( "golang.org/x/sys/unix" ) -func getWhiteoutConverter(format WhiteoutFormat, inUserNS bool) (tarWhiteoutConverter, error) { +func getWhiteoutConverter(format WhiteoutFormat) tarWhiteoutConverter { if format == OverlayWhiteoutFormat { - if inUserNS { - return nil, errors.New("specifying OverlayWhiteoutFormat is not allowed in userns") - } - return overlayWhiteoutConverter{}, nil + return overlayWhiteoutConverter{} } - return nil, nil + return nil } type overlayWhiteoutConverter struct{} diff --git a/vendor/github.com/docker/docker/pkg/archive/archive_other.go b/vendor/github.com/docker/docker/pkg/archive/archive_other.go index 3de1d64c80b9..7dee1f7a4615 100644 --- a/vendor/github.com/docker/docker/pkg/archive/archive_other.go +++ b/vendor/github.com/docker/docker/pkg/archive/archive_other.go @@ -2,6 +2,6 @@ package archive // import "github.com/docker/docker/pkg/archive" -func getWhiteoutConverter(format WhiteoutFormat, inUserNS bool) (tarWhiteoutConverter, error) { - return nil, nil +func getWhiteoutConverter(format WhiteoutFormat) tarWhiteoutConverter { + return nil } diff --git a/vendor/github.com/docker/docker/pkg/archive/archive_unix.go b/vendor/github.com/docker/docker/pkg/archive/archive_unix.go index f8192db52715..f559a30565f3 100644 --- a/vendor/github.com/docker/docker/pkg/archive/archive_unix.go +++ b/vendor/github.com/docker/docker/pkg/archive/archive_unix.go @@ -11,7 +11,6 @@ import ( "strings" "syscall" - "github.com/containerd/containerd/pkg/userns" "github.com/docker/docker/pkg/idtools" "github.com/docker/docker/pkg/system" "golang.org/x/sys/unix" @@ -95,7 +94,10 @@ func getFileUIDGID(stat interface{}) (idtools.Identity, error) { } // handleTarTypeBlockCharFifo is an OS-specific helper function used by -// createTarFile to handle the following types of header: Block; Char; Fifo +// createTarFile to handle the following types of header: Block; Char; Fifo. +// +// Creating device nodes is not supported when running in a user namespace, +// produces a [syscall.EPERM] in most cases. func handleTarTypeBlockCharFifo(hdr *tar.Header, path string) error { mode := uint32(hdr.Mode & 0o7777) switch hdr.Typeflag { @@ -107,12 +109,7 @@ func handleTarTypeBlockCharFifo(hdr *tar.Header, path string) error { mode |= unix.S_IFIFO } - err := system.Mknod(path, mode, int(system.Mkdev(hdr.Devmajor, hdr.Devminor))) - if errors.Is(err, syscall.EPERM) && userns.RunningInUserNS() { - // In most cases, cannot create a device if running in user namespace - err = nil - } - return err + return system.Mknod(path, mode, int(system.Mkdev(hdr.Devmajor, hdr.Devminor))) } func handleLChmod(hdr *tar.Header, path string, hdrInfo os.FileInfo) error { diff --git a/vendor/modules.txt b/vendor/modules.txt index 064fe88e457a..0274c2a5ec1c 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -53,7 +53,7 @@ github.com/docker/distribution/registry/client/transport github.com/docker/distribution/registry/storage/cache github.com/docker/distribution/registry/storage/cache/memory github.com/docker/distribution/uuid -# github.com/docker/docker v27.0.2+incompatible +# github.com/docker/docker v27.0.3+incompatible ## explicit github.com/docker/docker/api github.com/docker/docker/api/types From 5ed8f858cf78edf233e51ea0a1d097e8ab97d52f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Wed, 3 Jul 2024 10:59:37 +0200 Subject: [PATCH 02/50] update to go1.21.12 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - https://github.com/golang/go/issues?q=milestone%3AGo1.21.12+label%3ACherryPickApproved - full diff: https://github.com/golang/go/compare/go1.21.11...go1.21.12 These minor releases include 1 security fixes following the security policy: net/http: denial of service due to improper 100-continue handling The net/http HTTP/1.1 client mishandled the case where a server responds to a request with an "Expect: 100-continue" header with a non-informational (200 or higher) status. This mishandling could leave a client connection in an invalid state, where the next request sent on the connection will fail. An attacker sending a request to a net/http/httputil.ReverseProxy proxy can exploit this mishandling to cause a denial of service by sending "Expect: 100-continue" requests which elicit a non-informational response from the backend. Each such request leaves the proxy with an invalid connection, and causes one subsequent request using that connection to fail. Thanks to Geoff Franks for reporting this issue. This is CVE-2024-24791 and Go issue https://go.dev/issue/67555. View the release notes for more information: https://go.dev/doc/devel/release#go1.21.12 **- Description for the changelog** ```markdown changelog Update Go runtime to 1.21.12 ``` Signed-off-by: Paweł Gronowski (cherry picked from commit d73d7d4ed3f6211aa157d59a2e6674a1774dabc3) Signed-off-by: Paweł Gronowski --- .github/workflows/test.yml | 2 +- Dockerfile | 2 +- docker-bake.hcl | 2 +- dockerfiles/Dockerfile.dev | 2 +- dockerfiles/Dockerfile.lint | 2 +- dockerfiles/Dockerfile.vendor | 2 +- e2e/testdata/Dockerfile.gencerts | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2bd51e576f4c..842862ed5c52 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -64,7 +64,7 @@ jobs: name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.21.11 + go-version: 1.21.12 - name: Test run: | diff --git a/Dockerfile b/Dockerfile index 4295e46b17ae..875984e5a331 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ ARG BASE_VARIANT=alpine ARG ALPINE_VERSION=3.20 ARG BASE_DEBIAN_DISTRO=bookworm -ARG GO_VERSION=1.21.11 +ARG GO_VERSION=1.21.12 ARG XX_VERSION=1.4.0 ARG GOVERSIONINFO_VERSION=v1.3.0 ARG GOTESTSUM_VERSION=v1.10.0 diff --git a/docker-bake.hcl b/docker-bake.hcl index ef2f6c513a26..9dc53a831454 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -1,5 +1,5 @@ variable "GO_VERSION" { - default = "1.21.11" + default = "1.21.12" } variable "VERSION" { default = "" diff --git a/dockerfiles/Dockerfile.dev b/dockerfiles/Dockerfile.dev index 0fbf1d92d537..365c5e4216b4 100644 --- a/dockerfiles/Dockerfile.dev +++ b/dockerfiles/Dockerfile.dev @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -ARG GO_VERSION=1.21.11 +ARG GO_VERSION=1.21.12 ARG ALPINE_VERSION=3.20 ARG BUILDX_VERSION=0.15.1 diff --git a/dockerfiles/Dockerfile.lint b/dockerfiles/Dockerfile.lint index b2e3abc25237..00b6177aefc5 100644 --- a/dockerfiles/Dockerfile.lint +++ b/dockerfiles/Dockerfile.lint @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -ARG GO_VERSION=1.21.11 +ARG GO_VERSION=1.21.12 ARG ALPINE_VERSION=3.20 ARG GOLANGCI_LINT_VERSION=v1.59.1 diff --git a/dockerfiles/Dockerfile.vendor b/dockerfiles/Dockerfile.vendor index f204ea273e19..9acb89182240 100644 --- a/dockerfiles/Dockerfile.vendor +++ b/dockerfiles/Dockerfile.vendor @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -ARG GO_VERSION=1.21.11 +ARG GO_VERSION=1.21.12 ARG ALPINE_VERSION=3.20 ARG MODOUTDATED_VERSION=v0.8.0 diff --git a/e2e/testdata/Dockerfile.gencerts b/e2e/testdata/Dockerfile.gencerts index 7bcecaf830d0..3c9cc7e80177 100644 --- a/e2e/testdata/Dockerfile.gencerts +++ b/e2e/testdata/Dockerfile.gencerts @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -ARG GO_VERSION=1.21.11 +ARG GO_VERSION=1.21.12 FROM golang:${GO_VERSION}-alpine AS generated ENV GOTOOLCHAIN=local From 27bf78d33580924a2965462662bd36947ed5d84f Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Wed, 10 Apr 2024 12:10:10 +0200 Subject: [PATCH 03/50] docs: make buildx build the canonical reference doc Move common flag descriptions to the buildx build reference, and make that page the canonical page in docs. Also rewrite some content in image_build to make clear that this page is only for the legacy builder. Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> (cherry picked from commit e91f0ded9c386dc8e29f298dd697e228cdd28aa3) Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- cli/command/image/build.go | 10 +- docs/reference/commandline/build.md | 66 +- docs/reference/commandline/builder_build.md | 66 +- docs/reference/commandline/image_build.md | 674 +++--------------- vendor.mod | 1 + vendor.sum | 2 + .../github.com/docker/cli-docs-tool/LICENSE | 202 ++++++ .../cli-docs-tool/annotation/annotation.go | 25 + vendor/modules.txt | 3 + 9 files changed, 394 insertions(+), 655 deletions(-) create mode 100644 vendor/github.com/docker/cli-docs-tool/LICENSE create mode 100644 vendor/github.com/docker/cli-docs-tool/annotation/annotation.go diff --git a/cli/command/image/build.go b/cli/command/image/build.go index 409b6cda18f1..cb5292be85c0 100644 --- a/cli/command/image/build.go +++ b/cli/command/image/build.go @@ -15,6 +15,7 @@ import ( "strings" "github.com/distribution/reference" + "github.com/docker/cli-docs-tool/annotation" "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/cli/cli/command/image/build" @@ -104,7 +105,7 @@ func NewBuildCommand(dockerCli command.Cli) *cobra.Command { }, Annotations: map[string]string{ "category-top": "4", - "aliases": "docker image build, docker build, docker buildx build, docker builder build", + "aliases": "docker image build, docker build, docker builder build", }, ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { return nil, cobra.ShellCompDirectiveFilterDirs @@ -114,9 +115,12 @@ func NewBuildCommand(dockerCli command.Cli) *cobra.Command { flags := cmd.Flags() flags.VarP(&options.tags, "tag", "t", `Name and optionally a tag in the "name:tag" format`) + flags.SetAnnotation("tag", annotation.ExternalURL, []string{"https://docs.docker.com/reference/cli/docker/buildx/build/#tag"}) flags.Var(&options.buildArgs, "build-arg", "Set build-time variables") + flags.SetAnnotation("build-arg", annotation.ExternalURL, []string{"https://docs.docker.com/reference/cli/docker/buildx/build/#build-arg"}) flags.Var(options.ulimits, "ulimit", "Ulimit options") flags.StringVarP(&options.dockerfileName, "file", "f", "", `Name of the Dockerfile (Default is "PATH/Dockerfile")`) + flags.SetAnnotation("file", annotation.ExternalURL, []string{"https://docs.docker.com/reference/cli/docker/buildx/build/#file"}) flags.VarP(&options.memory, "memory", "m", "Memory limit") flags.Var(&options.memorySwap, "memory-swap", `Swap limit equal to memory plus swap: -1 to enable unlimited swap`) flags.Var(&options.shmSize, "shm-size", `Size of "/dev/shm"`) @@ -126,6 +130,7 @@ func NewBuildCommand(dockerCli command.Cli) *cobra.Command { flags.StringVar(&options.cpuSetCpus, "cpuset-cpus", "", "CPUs in which to allow execution (0-3, 0,1)") flags.StringVar(&options.cpuSetMems, "cpuset-mems", "", "MEMs in which to allow execution (0-3, 0,1)") flags.StringVar(&options.cgroupParent, "cgroup-parent", "", `Set the parent cgroup for the "RUN" instructions during build`) + flags.SetAnnotation("cgroup-parent", annotation.ExternalURL, []string{"https://docs.docker.com/reference/cli/docker/buildx/build/#cgroup-parent"}) flags.StringVar(&options.isolation, "isolation", "", "Container isolation technology") flags.Var(&options.labels, "label", "Set metadata for an image") flags.BoolVar(&options.noCache, "no-cache", false, "Do not use cache when building the image") @@ -138,8 +143,11 @@ func NewBuildCommand(dockerCli command.Cli) *cobra.Command { flags.StringSliceVar(&options.securityOpt, "security-opt", []string{}, "Security options") flags.StringVar(&options.networkMode, "network", "default", "Set the networking mode for the RUN instructions during build") flags.SetAnnotation("network", "version", []string{"1.25"}) + flags.SetAnnotation("network", annotation.ExternalURL, []string{"https://docs.docker.com/reference/cli/docker/buildx/build/#network"}) flags.Var(&options.extraHosts, "add-host", `Add a custom host-to-IP mapping ("host:ip")`) + flags.SetAnnotation("add-host", annotation.ExternalURL, []string{"https://docs.docker.com/reference/cli/docker/buildx/build/#add-host"}) flags.StringVar(&options.target, "target", "", "Set the target build stage to build.") + flags.SetAnnotation("target", annotation.ExternalURL, []string{"https://docs.docker.com/reference/cli/docker/buildx/build/#target"}) flags.StringVar(&options.imageIDFile, "iidfile", "", "Write the image ID to the file") command.AddTrustVerificationFlags(flags, &options.untrusted, dockerCli.ContentTrustEnabled()) diff --git a/docs/reference/commandline/build.md b/docs/reference/commandline/build.md index c0dd7a676897..e2f4765a4408 100644 --- a/docs/reference/commandline/build.md +++ b/docs/reference/commandline/build.md @@ -5,42 +5,42 @@ Build an image from a Dockerfile ### Aliases -`docker image build`, `docker build`, `docker buildx build`, `docker builder build` +`docker image build`, `docker build`, `docker builder build` ### Options -| Name | Type | Default | Description | -|:--------------------------|:--------------|:----------|:------------------------------------------------------------------| -| `--add-host` | `list` | | Add a custom host-to-IP mapping (`host:ip`) | -| `--build-arg` | `list` | | Set build-time variables | -| `--cache-from` | `stringSlice` | | Images to consider as cache sources | -| `--cgroup-parent` | `string` | | Set the parent cgroup for the `RUN` instructions during build | -| `--compress` | | | Compress the build context using gzip | -| `--cpu-period` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) period | -| `--cpu-quota` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) quota | -| `-c`, `--cpu-shares` | `int64` | `0` | CPU shares (relative weight) | -| `--cpuset-cpus` | `string` | | CPUs in which to allow execution (0-3, 0,1) | -| `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) | -| `--disable-content-trust` | `bool` | `true` | Skip image verification | -| `-f`, `--file` | `string` | | Name of the Dockerfile (Default is `PATH/Dockerfile`) | -| `--force-rm` | | | Always remove intermediate containers | -| `--iidfile` | `string` | | Write the image ID to the file | -| `--isolation` | `string` | | Container isolation technology | -| `--label` | `list` | | Set metadata for an image | -| `-m`, `--memory` | `bytes` | `0` | Memory limit | -| `--memory-swap` | `bytes` | `0` | Swap limit equal to memory plus swap: -1 to enable unlimited swap | -| `--network` | `string` | `default` | Set the networking mode for the RUN instructions during build | -| `--no-cache` | | | Do not use cache when building the image | -| `--platform` | `string` | | Set platform if server is multi-platform capable | -| `--pull` | | | Always attempt to pull a newer version of the image | -| `-q`, `--quiet` | | | Suppress the build output and print image ID on success | -| `--rm` | `bool` | `true` | Remove intermediate containers after a successful build | -| `--security-opt` | `stringSlice` | | Security options | -| `--shm-size` | `bytes` | `0` | Size of `/dev/shm` | -| `--squash` | | | Squash newly built layers into a single new layer | -| `-t`, `--tag` | `list` | | Name and optionally a tag in the `name:tag` format | -| `--target` | `string` | | Set the target build stage to build. | -| `--ulimit` | `ulimit` | | Ulimit options | +| Name | Type | Default | Description | +|:-----------------------------------------------------------------------------------------------------------------------------------------------------|:--------------|:----------|:------------------------------------------------------------------| +| [`--add-host`](https://docs.docker.com/reference/cli/docker/buildx/build/#add-host) | `list` | | Add a custom host-to-IP mapping (`host:ip`) | +| [`--build-arg`](https://docs.docker.com/reference/cli/docker/buildx/build/#build-arg) | `list` | | Set build-time variables | +| `--cache-from` | `stringSlice` | | Images to consider as cache sources | +| [`--cgroup-parent`](https://docs.docker.com/reference/cli/docker/buildx/build/#cgroup-parent) | `string` | | Set the parent cgroup for the `RUN` instructions during build | +| `--compress` | | | Compress the build context using gzip | +| `--cpu-period` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) period | +| `--cpu-quota` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) quota | +| `-c`, `--cpu-shares` | `int64` | `0` | CPU shares (relative weight) | +| `--cpuset-cpus` | `string` | | CPUs in which to allow execution (0-3, 0,1) | +| `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) | +| `--disable-content-trust` | `bool` | `true` | Skip image verification | +| [`-f`](https://docs.docker.com/reference/cli/docker/buildx/build/#file), [`--file`](https://docs.docker.com/reference/cli/docker/buildx/build/#file) | `string` | | Name of the Dockerfile (Default is `PATH/Dockerfile`) | +| `--force-rm` | | | Always remove intermediate containers | +| `--iidfile` | `string` | | Write the image ID to the file | +| `--isolation` | `string` | | Container isolation technology | +| `--label` | `list` | | Set metadata for an image | +| `-m`, `--memory` | `bytes` | `0` | Memory limit | +| `--memory-swap` | `bytes` | `0` | Swap limit equal to memory plus swap: -1 to enable unlimited swap | +| [`--network`](https://docs.docker.com/reference/cli/docker/buildx/build/#network) | `string` | `default` | Set the networking mode for the RUN instructions during build | +| `--no-cache` | | | Do not use cache when building the image | +| `--platform` | `string` | | Set platform if server is multi-platform capable | +| `--pull` | | | Always attempt to pull a newer version of the image | +| `-q`, `--quiet` | | | Suppress the build output and print image ID on success | +| `--rm` | `bool` | `true` | Remove intermediate containers after a successful build | +| `--security-opt` | `stringSlice` | | Security options | +| `--shm-size` | `bytes` | `0` | Size of `/dev/shm` | +| `--squash` | | | Squash newly built layers into a single new layer | +| [`-t`](https://docs.docker.com/reference/cli/docker/buildx/build/#tag), [`--tag`](https://docs.docker.com/reference/cli/docker/buildx/build/#tag) | `list` | | Name and optionally a tag in the `name:tag` format | +| [`--target`](https://docs.docker.com/reference/cli/docker/buildx/build/#target) | `string` | | Set the target build stage to build. | +| `--ulimit` | `ulimit` | | Ulimit options | diff --git a/docs/reference/commandline/builder_build.md b/docs/reference/commandline/builder_build.md index b972d573fac1..53da887d9c84 100644 --- a/docs/reference/commandline/builder_build.md +++ b/docs/reference/commandline/builder_build.md @@ -5,42 +5,42 @@ Build an image from a Dockerfile ### Aliases -`docker image build`, `docker build`, `docker buildx build`, `docker builder build` +`docker image build`, `docker build`, `docker builder build` ### Options -| Name | Type | Default | Description | -|:--------------------------|:--------------|:----------|:------------------------------------------------------------------| -| `--add-host` | `list` | | Add a custom host-to-IP mapping (`host:ip`) | -| `--build-arg` | `list` | | Set build-time variables | -| `--cache-from` | `stringSlice` | | Images to consider as cache sources | -| `--cgroup-parent` | `string` | | Set the parent cgroup for the `RUN` instructions during build | -| `--compress` | | | Compress the build context using gzip | -| `--cpu-period` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) period | -| `--cpu-quota` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) quota | -| `-c`, `--cpu-shares` | `int64` | `0` | CPU shares (relative weight) | -| `--cpuset-cpus` | `string` | | CPUs in which to allow execution (0-3, 0,1) | -| `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) | -| `--disable-content-trust` | `bool` | `true` | Skip image verification | -| `-f`, `--file` | `string` | | Name of the Dockerfile (Default is `PATH/Dockerfile`) | -| `--force-rm` | | | Always remove intermediate containers | -| `--iidfile` | `string` | | Write the image ID to the file | -| `--isolation` | `string` | | Container isolation technology | -| `--label` | `list` | | Set metadata for an image | -| `-m`, `--memory` | `bytes` | `0` | Memory limit | -| `--memory-swap` | `bytes` | `0` | Swap limit equal to memory plus swap: -1 to enable unlimited swap | -| `--network` | `string` | `default` | Set the networking mode for the RUN instructions during build | -| `--no-cache` | | | Do not use cache when building the image | -| `--platform` | `string` | | Set platform if server is multi-platform capable | -| `--pull` | | | Always attempt to pull a newer version of the image | -| `-q`, `--quiet` | | | Suppress the build output and print image ID on success | -| `--rm` | `bool` | `true` | Remove intermediate containers after a successful build | -| `--security-opt` | `stringSlice` | | Security options | -| `--shm-size` | `bytes` | `0` | Size of `/dev/shm` | -| `--squash` | | | Squash newly built layers into a single new layer | -| `-t`, `--tag` | `list` | | Name and optionally a tag in the `name:tag` format | -| `--target` | `string` | | Set the target build stage to build. | -| `--ulimit` | `ulimit` | | Ulimit options | +| Name | Type | Default | Description | +|:-----------------------------------------------------------------------------------------------------------------------------------------------------|:--------------|:----------|:------------------------------------------------------------------| +| [`--add-host`](https://docs.docker.com/reference/cli/docker/buildx/build/#add-host) | `list` | | Add a custom host-to-IP mapping (`host:ip`) | +| [`--build-arg`](https://docs.docker.com/reference/cli/docker/buildx/build/#build-arg) | `list` | | Set build-time variables | +| `--cache-from` | `stringSlice` | | Images to consider as cache sources | +| [`--cgroup-parent`](https://docs.docker.com/reference/cli/docker/buildx/build/#cgroup-parent) | `string` | | Set the parent cgroup for the `RUN` instructions during build | +| `--compress` | | | Compress the build context using gzip | +| `--cpu-period` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) period | +| `--cpu-quota` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) quota | +| `-c`, `--cpu-shares` | `int64` | `0` | CPU shares (relative weight) | +| `--cpuset-cpus` | `string` | | CPUs in which to allow execution (0-3, 0,1) | +| `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) | +| `--disable-content-trust` | `bool` | `true` | Skip image verification | +| [`-f`](https://docs.docker.com/reference/cli/docker/buildx/build/#file), [`--file`](https://docs.docker.com/reference/cli/docker/buildx/build/#file) | `string` | | Name of the Dockerfile (Default is `PATH/Dockerfile`) | +| `--force-rm` | | | Always remove intermediate containers | +| `--iidfile` | `string` | | Write the image ID to the file | +| `--isolation` | `string` | | Container isolation technology | +| `--label` | `list` | | Set metadata for an image | +| `-m`, `--memory` | `bytes` | `0` | Memory limit | +| `--memory-swap` | `bytes` | `0` | Swap limit equal to memory plus swap: -1 to enable unlimited swap | +| [`--network`](https://docs.docker.com/reference/cli/docker/buildx/build/#network) | `string` | `default` | Set the networking mode for the RUN instructions during build | +| `--no-cache` | | | Do not use cache when building the image | +| `--platform` | `string` | | Set platform if server is multi-platform capable | +| `--pull` | | | Always attempt to pull a newer version of the image | +| `-q`, `--quiet` | | | Suppress the build output and print image ID on success | +| `--rm` | `bool` | `true` | Remove intermediate containers after a successful build | +| `--security-opt` | `stringSlice` | | Security options | +| `--shm-size` | `bytes` | `0` | Size of `/dev/shm` | +| `--squash` | | | Squash newly built layers into a single new layer | +| [`-t`](https://docs.docker.com/reference/cli/docker/buildx/build/#tag), [`--tag`](https://docs.docker.com/reference/cli/docker/buildx/build/#tag) | `list` | | Name and optionally a tag in the `name:tag` format | +| [`--target`](https://docs.docker.com/reference/cli/docker/buildx/build/#target) | `string` | | Set the target build stage to build. | +| `--ulimit` | `ulimit` | | Ulimit options | diff --git a/docs/reference/commandline/image_build.md b/docs/reference/commandline/image_build.md index bae3c5a90035..a971d12967c7 100644 --- a/docs/reference/commandline/image_build.md +++ b/docs/reference/commandline/image_build.md @@ -1,438 +1,124 @@ -# build +# build (legacy builder) Build an image from a Dockerfile ### Aliases -`docker image build`, `docker build`, `docker buildx build`, `docker builder build` +`docker image build`, `docker build`, `docker builder build` ### Options -| Name | Type | Default | Description | -|:------------------------------------|:--------------|:----------|:------------------------------------------------------------------| -| [`--add-host`](#add-host) | `list` | | Add a custom host-to-IP mapping (`host:ip`) | -| [`--build-arg`](#build-arg) | `list` | | Set build-time variables | -| [`--cache-from`](#cache-from) | `stringSlice` | | Images to consider as cache sources | -| [`--cgroup-parent`](#cgroup-parent) | `string` | | Set the parent cgroup for the `RUN` instructions during build | -| `--compress` | | | Compress the build context using gzip | -| `--cpu-period` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) period | -| `--cpu-quota` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) quota | -| `-c`, `--cpu-shares` | `int64` | `0` | CPU shares (relative weight) | -| `--cpuset-cpus` | `string` | | CPUs in which to allow execution (0-3, 0,1) | -| `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) | -| `--disable-content-trust` | `bool` | `true` | Skip image verification | -| [`-f`](#file), [`--file`](#file) | `string` | | Name of the Dockerfile (Default is `PATH/Dockerfile`) | -| `--force-rm` | | | Always remove intermediate containers | -| `--iidfile` | `string` | | Write the image ID to the file | -| [`--isolation`](#isolation) | `string` | | Container isolation technology | -| `--label` | `list` | | Set metadata for an image | -| `-m`, `--memory` | `bytes` | `0` | Memory limit | -| `--memory-swap` | `bytes` | `0` | Swap limit equal to memory plus swap: -1 to enable unlimited swap | -| [`--network`](#network) | `string` | `default` | Set the networking mode for the RUN instructions during build | -| `--no-cache` | | | Do not use cache when building the image | -| `--platform` | `string` | | Set platform if server is multi-platform capable | -| `--pull` | | | Always attempt to pull a newer version of the image | -| `-q`, `--quiet` | | | Suppress the build output and print image ID on success | -| `--rm` | `bool` | `true` | Remove intermediate containers after a successful build | -| [`--security-opt`](#security-opt) | `stringSlice` | | Security options | -| `--shm-size` | `bytes` | `0` | Size of `/dev/shm` | -| [`--squash`](#squash) | | | Squash newly built layers into a single new layer | -| [`-t`](#tag), [`--tag`](#tag) | `list` | | Name and optionally a tag in the `name:tag` format | -| [`--target`](#target) | `string` | | Set the target build stage to build. | -| [`--ulimit`](#ulimit) | `ulimit` | | Ulimit options | +| Name | Type | Default | Description | +|:-----------------------------------------------------------------------------------------------------------------------------------------------------|:--------------|:----------|:------------------------------------------------------------------| +| [`--add-host`](https://docs.docker.com/reference/cli/docker/buildx/build/#add-host) | `list` | | Add a custom host-to-IP mapping (`host:ip`) | +| [`--build-arg`](https://docs.docker.com/reference/cli/docker/buildx/build/#build-arg) | `list` | | Set build-time variables | +| `--cache-from` | `stringSlice` | | Images to consider as cache sources | +| [`--cgroup-parent`](https://docs.docker.com/reference/cli/docker/buildx/build/#cgroup-parent) | `string` | | Set the parent cgroup for the `RUN` instructions during build | +| `--compress` | | | Compress the build context using gzip | +| `--cpu-period` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) period | +| `--cpu-quota` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) quota | +| `-c`, `--cpu-shares` | `int64` | `0` | CPU shares (relative weight) | +| `--cpuset-cpus` | `string` | | CPUs in which to allow execution (0-3, 0,1) | +| `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) | +| `--disable-content-trust` | `bool` | `true` | Skip image verification | +| [`-f`](https://docs.docker.com/reference/cli/docker/buildx/build/#file), [`--file`](https://docs.docker.com/reference/cli/docker/buildx/build/#file) | `string` | | Name of the Dockerfile (Default is `PATH/Dockerfile`) | +| `--force-rm` | | | Always remove intermediate containers | +| `--iidfile` | `string` | | Write the image ID to the file | +| [`--isolation`](#isolation) | `string` | | Container isolation technology | +| `--label` | `list` | | Set metadata for an image | +| `-m`, `--memory` | `bytes` | `0` | Memory limit | +| `--memory-swap` | `bytes` | `0` | Swap limit equal to memory plus swap: -1 to enable unlimited swap | +| [`--network`](https://docs.docker.com/reference/cli/docker/buildx/build/#network) | `string` | `default` | Set the networking mode for the RUN instructions during build | +| `--no-cache` | | | Do not use cache when building the image | +| `--platform` | `string` | | Set platform if server is multi-platform capable | +| `--pull` | | | Always attempt to pull a newer version of the image | +| `-q`, `--quiet` | | | Suppress the build output and print image ID on success | +| `--rm` | `bool` | `true` | Remove intermediate containers after a successful build | +| [`--security-opt`](#security-opt) | `stringSlice` | | Security options | +| `--shm-size` | `bytes` | `0` | Size of `/dev/shm` | +| [`--squash`](#squash) | | | Squash newly built layers into a single new layer | +| [`-t`](https://docs.docker.com/reference/cli/docker/buildx/build/#tag), [`--tag`](https://docs.docker.com/reference/cli/docker/buildx/build/#tag) | `list` | | Name and optionally a tag in the `name:tag` format | +| [`--target`](https://docs.docker.com/reference/cli/docker/buildx/build/#target) | `string` | | Set the target build stage to build. | +| `--ulimit` | `ulimit` | | Ulimit options | ## Description -The `docker build` command builds Docker images from a Dockerfile and a -"context". A build's context is the set of files located in the specified -`PATH` or `URL`. The build process can refer to any of the files in the -context. For example, your build can use a [*COPY*](https://docs.docker.com/reference/dockerfile/#copy) -instruction to reference a file in the context. - -The `URL` parameter can refer to three kinds of resources: Git repositories, -pre-packaged tarball contexts, and plain text files. - -### Git repositories - -When the `URL` parameter points to the location of a Git repository, the -repository acts as the build context. The system recursively fetches the -repository and its submodules. The commit history isn't preserved. A -repository is first pulled into a temporary directory on your local host. After -that succeeds, the command sends the directory to the Docker daemon as the context. -Local copy gives you the ability to access private repositories using local -user credentials, VPNs, and so forth. - > **Note** > -> If the `URL` parameter contains a fragment the system recursively clones -> the repository and its submodules. - -Git URLs accept context configuration in their fragment section, separated by a -colon (`:`). The first part represents the reference that Git checks out, -and can be either a branch, a tag, or a remote reference. The second part -represents a subdirectory inside the repository used as a build -context. - -For example, run this command to use a directory called `docker` in the branch -`container`: - -```console -$ docker build https://github.com/docker/rootfs.git#container:docker -``` - -The following table represents all the valid suffixes with their build -contexts: - -| Build Syntax Suffix | Commit Used | Build Context Used | -|--------------------------------|-----------------------|--------------------| -| `myrepo.git` | `refs/heads/master` | `/` | -| `myrepo.git#mytag` | `refs/tags/mytag` | `/` | -| `myrepo.git#mybranch` | `refs/heads/mybranch` | `/` | -| `myrepo.git#pull/42/head` | `refs/pull/42/head` | `/` | -| `myrepo.git#:myfolder` | `refs/heads/master` | `/myfolder` | -| `myrepo.git#master:myfolder` | `refs/heads/master` | `/myfolder` | -| `myrepo.git#mytag:myfolder` | `refs/tags/mytag` | `/myfolder` | -| `myrepo.git#mybranch:myfolder` | `refs/heads/mybranch` | `/myfolder` | - -### Tarball contexts - -If you pass a URL to a remote tarball, the command sends the URL itself to the -daemon: - -```console -$ docker build http://server/context.tar.gz -``` - -The host running the Docker daemon performs the download operation, -which isn't necessarily the same host that issued the build command. -The Docker daemon fetches `context.tar.gz` and uses it as the -build context. Tarball contexts must be tar archives conforming to the standard -`tar` Unix format and can be compressed with any one of the `xz`, `bzip2`, -`gzip` or `identity` (no compression) formats. - -### Text files - -Instead of specifying a context, you can pass a single `Dockerfile` in the -`URL` or pipe the file in via `STDIN`. To pipe a `Dockerfile` from `STDIN`: - -```console -$ docker build - < Dockerfile -``` - -With PowerShell on Windows, you run: - -```powershell -Get-Content Dockerfile | docker build - -``` - -If you use `STDIN` or specify a `URL` pointing to a plain text file, the daemon -places the contents into a `Dockerfile`, and ignores any `-f`, `--file` -option. In this scenario, there is no context. - -By default the `docker build` command looks for a `Dockerfile` at the root -of the build context. The `-f`, `--file`, option lets you specify the path to -an alternative file to use instead. This is useful in cases that use the same -set of files for multiple builds. The path must be to a file within the -build context. Relative path are interpreted as relative to the root of the -context. - -In most cases, it's best to put each Dockerfile in an empty directory. Then, -add to that directory only the files needed for building the Dockerfile. To -increase the build's performance, you can exclude files and directories by -adding a `.dockerignore` file to that directory as well. For information on -creating one, see the [.dockerignore file](https://docs.docker.com/reference/dockerfile/#dockerignore-file). - -If the Docker client loses connection to the daemon, it cancels the build. -This happens if you interrupt the Docker client with `CTRL-c` or if the Docker -client is killed for any reason. If the build initiated a pull which is still -running at the time the build is cancelled, the client also cancels the pull. - -## Return code +> This page refers to the **legacy implementation** of `docker build`, +> using the legacy (pre-BuildKit) build backend. +> This configuration is only relevant if you're building Windows containers. +> +> For information about the default `docker build`, using Buildx, +> see [`docker buildx build`](https://docs.docker.com/reference/cli/docker/build/). -Successful builds return exit code `0`. When the build fails, the command -returns a non-zero exit code and prints an error message to `STDERR`: +When building with legacy builder, images are created from a Dockerfile by +running a sequence of [commits](./container_commit.md). This process is +inefficient and slow compared to using BuildKit, which is why this build +strategy is deprecated for all use cases except for building Windows +containers. It's still useful for building Windows containers because BuildKit +doesn't yet have full feature parity for Windows. -```console -$ docker build -t fail . - -Sending build context to Docker daemon 2.048 kB -Sending build context to Docker daemon -Step 1/3 : FROM busybox - ---> 4986bf8c1536 -Step 2/3 : RUN exit 13 - ---> Running in e26670ec7a0a -INFO[0000] The command [/bin/sh -c exit 13] returned a non-zero code: 13 -$ echo $? -1 -``` +Builds invoked with `docker build` use Buildx (and BuildKit) by default, unless: -See also: +- You're running Docker Engine in Windows container mode +- You explicitly opt out of using BuildKit by setting the environment variable `DOCKER_BUILDKIT=0`. -[*Dockerfile Reference*](https://docs.docker.com/reference/dockerfile/). +The descriptions on this page only covers information that's exclusive to the +legacy builder, and cases where behavior in the legacy builder deviates from +behavior in BuildKit. For information about features and flags that are common +between the legacy builder and BuildKit, such as `--tag` and `--target`, refer +to the documentation for [`docker buildx build`](https://docs.docker.com/reference/cli/docker/buildx/build/). -## Examples +### Build context with the legacy builder -### Build with PATH +The build context is the positional argument you pass when invoking the build +command. In the following example, the context is `.`, meaning current the +working directory. ```console $ docker build . - -Uploading context 10240 bytes -Step 1/3 : FROM busybox -Pulling repository busybox - ---> e9aa60c60128MB/2.284 MB (100%) endpoint: https://cdn-registry-1.docker.io/v1/ -Step 2/3 : RUN ls -lh / - ---> Running in 9c9e81692ae9 -total 24 -drwxr-xr-x 2 root root 4.0K Mar 12 2013 bin -drwxr-xr-x 5 root root 4.0K Oct 19 00:19 dev -drwxr-xr-x 2 root root 4.0K Oct 19 00:19 etc -drwxr-xr-x 2 root root 4.0K Nov 15 23:34 lib -lrwxrwxrwx 1 root root 3 Mar 12 2013 lib64 -> lib -dr-xr-xr-x 116 root root 0 Nov 15 23:34 proc -lrwxrwxrwx 1 root root 3 Mar 12 2013 sbin -> bin -dr-xr-xr-x 13 root root 0 Nov 15 23:34 sys -drwxr-xr-x 2 root root 4.0K Mar 12 2013 tmp -drwxr-xr-x 2 root root 4.0K Nov 15 23:34 usr - ---> b35f4035db3f -Step 3/3 : CMD echo Hello world - ---> Running in 02071fceb21b - ---> f52f38b7823e -Successfully built f52f38b7823e -Removing intermediate container 9c9e81692ae9 -Removing intermediate container 02071fceb21b -``` - -This example specifies that the `PATH` is `.`, and so `tar`s all the files in the -local directory and sends them to the Docker daemon. The `PATH` specifies -where to find the files for the "context" of the build on the Docker daemon. -Remember that the daemon could be running on a remote machine and that no -parsing of the Dockerfile happens at the client side (where you're running -`docker build`). That means that all the files at `PATH` are sent, not just -the ones listed to [`ADD`](https://docs.docker.com/reference/dockerfile/#add) -in the Dockerfile. - -The transfer of context from the local machine to the Docker daemon is what the -`docker` client means when you see the "Sending build context" message. - -If you wish to keep the intermediate containers after the build is complete, -you must use `--rm=false`. This doesn't affect the build cache. - -### Build with URL - -```console -$ docker build github.com/creack/docker-firefox ``` -This clones the GitHub repository, using the cloned repository as context, -and the Dockerfile at the root of the repository. You can -specify an arbitrary Git repository by using the `git://` or `git@` scheme. +When using the legacy builder, the build context is sent over to the daemon in +its entirety. With BuildKit, only the files you use in your builds are +transmitted. The legacy builder doesn't calculate which files it needs +beforehand. This means that for builds with a large context, context transfer +can take a long time, even if you're only using a subset of the files included +in the context. -```console -$ docker build -f ctx/Dockerfile http://server/ctx.tar.gz - -Downloading context: http://server/ctx.tar.gz [===================>] 240 B/240 B -Step 1/3 : FROM busybox - ---> 8c2e06607696 -Step 2/3 : ADD ctx/container.cfg / - ---> e7829950cee3 -Removing intermediate container b35224abf821 -Step 3/3 : CMD /bin/ls - ---> Running in fbc63d321d73 - ---> 3286931702ad -Removing intermediate container fbc63d321d73 -Successfully built 377c409b35e4 -``` - -This sends the URL `http://server/ctx.tar.gz` to the Docker daemon, which -downloads and extracts the referenced tarball. The `-f ctx/Dockerfile` -parameter specifies a path inside `ctx.tar.gz` to the `Dockerfile` used -to build the image. Any `ADD` commands in that `Dockerfile` that refer to local -paths must be relative to the root of the contents inside `ctx.tar.gz`. In the -example above, the tarball contains a directory `ctx/`, so the `ADD -ctx/container.cfg /` operation works as expected. +When using the legacy builder, it's therefore extra important that you +carefully consider what files you include in the context you specify. Use a +[`.dockerignore`](https://docs.docker.com/build/building/context/#dockerignore-files) +file to exclude files and directories that you don't require in your build from +being sent as part of the build context. -### Build with `-` - -```console -$ docker build - < Dockerfile -``` +#### Accessing paths outside the build context -This example reads a Dockerfile from `STDIN` without context. Due to the lack of a -context, the command doesn't send contents of any local directory to the Docker daemon. -Since there is no context, a Dockerfile `ADD` only works if it refers to a -remote URL. +The legacy builder will error out if you try to access files outside of the +build context using relative paths in your Dockerfile. -```console -$ docker build - < context.tar.gz +```dockerfile +FROM alpine +COPY ../../some-dir . ``` -This example builds an image for a compressed context read from `STDIN`. -Supported formats are: `bzip2`, `gzip` and `xz`. - -### Use a .dockerignore file - ```console $ docker build . - -Uploading context 18.829 MB -Uploading context -Step 1/2 : FROM busybox - ---> 769b9341d937 -Step 2/2 : CMD echo Hello world - ---> Using cache - ---> 99cc1ad10469 -Successfully built 99cc1ad10469 -$ echo ".git" > .dockerignore -$ docker build . -Uploading context 6.76 MB -Uploading context -Step 1/2 : FROM busybox - ---> 769b9341d937 -Step 2/2 : CMD echo Hello world - ---> Using cache - ---> 99cc1ad10469 -Successfully built 99cc1ad10469 -``` - -This example shows the use of the `.dockerignore` file to exclude the `.git` -directory from the context. You can see its effect in the changed size of the -uploaded context. The builder reference contains detailed information on -[creating a .dockerignore file](https://docs.docker.com/reference/dockerfile/#dockerignore-file). - -When using the [BuildKit backend](https://docs.docker.com/build/buildkit/), -`docker build` searches for a `.dockerignore` file relative to the Dockerfile -name. For example, running `docker build -f myapp.Dockerfile .` first looks -for an ignore file named `myapp.Dockerfile.dockerignore`. If it can't find such a file, -if present, it uses the `.dockerignore` file. Using a Dockerfile based -`.dockerignore` is useful if a project contains multiple Dockerfiles that expect -to ignore different sets of files. - -### Tag an image (-t, --tag) - -```console -$ docker build -t vieux/apache:2.0 . -``` - -This examples builds in the same way as the previous example, but it then tags the resulting -image. The repository name will be `vieux/apache` and the tag `2.0`. - -[Read more about valid tags](image_tag.md). - -You can apply multiple tags to an image. For example, you can apply the `latest` -tag to a newly built image and add another tag that references a specific -version. - -For example, to tag an image both as `whenry/fedora-jboss:latest` and -`whenry/fedora-jboss:v2.1`, use the following: - -```console -$ docker build -t whenry/fedora-jboss:latest -t whenry/fedora-jboss:v2.1 . -``` - -### Specify a Dockerfile (-f, --file) - -```console -$ docker build -f Dockerfile.debug . -``` - -This uses a file called `Dockerfile.debug` for the build instructions -instead of `Dockerfile`. - -```console -$ curl example.com/remote/Dockerfile | docker build -f - . -``` - -The above command uses the current directory as the build context and reads -a Dockerfile from stdin. - -```console -$ docker build -f dockerfiles/Dockerfile.debug -t myapp_debug . -$ docker build -f dockerfiles/Dockerfile.prod -t myapp_prod . -``` - -The above commands build the current build context (as specified by the -`.`) twice. Once using a debug version of a `Dockerfile` and once using a -production version. - -```console -$ cd /home/me/myapp/some/dir/really/deep -$ docker build -f /home/me/myapp/dockerfiles/debug /home/me/myapp -$ docker build -f ../../../../dockerfiles/debug /home/me/myapp +... +Step 2/2 : COPY ../../some-dir . +COPY failed: forbidden path outside the build context: ../../some-dir () ``` -These two `docker build` commands do the exact same thing. They both use the -contents of the `debug` file instead of looking for a `Dockerfile` and use -`/home/me/myapp` as the root of the build context. Note that `debug` is in the -directory structure of the build context, regardless of how you refer to it on -the command line. - -> **Note** -> -> `docker build` returns a `no such file or directory` error if the -> file or directory doesn't exist in the uploaded context. This may -> happen if there is no context, or if you specify a file that's -> elsewhere on the Host system. The context is limited to the current -> directory (and its children) for security reasons, and to ensure -> repeatable builds on remote Docker hosts. This is also the reason why -> `ADD ../file` doesn't work. - -### Use a custom parent cgroup (--cgroup-parent) - -When you run `docker build` with the `--cgroup-parent` option, the daemon runs the containers -used in the build with the [corresponding `docker run` flag](container_run.md#cgroup-parent). - -### Set ulimits in container (--ulimit) - -Using the `--ulimit` option with `docker build` causes the daemon to start each build step's -container using those [`--ulimit` flag values](container_run.md#ulimit). - -### Set build-time variables (--build-arg) - -You can use `ENV` instructions in a Dockerfile to define variable values. These -values persist in the built image. Often persistence isn't what you want. Users -want to specify variables differently depending on which host they build an -image on. - -A good example is `http_proxy` or source versions for pulling intermediate -files. The `ARG` instruction lets Dockerfile authors define values that users -can set at build-time using the `--build-arg` flag: - -```console -$ docker build --build-arg HTTP_PROXY=http://10.20.30.2:1234 --build-arg FTP_PROXY=http://40.50.60.5:4567 . -``` +BuildKit on the other hand strips leading relative paths that traverse outside +of the build context. Re-using the previous example, the path `COPY +../../some-dir .` evaluates to `COPY some-dir .` with BuildKit. -This flag allows you to pass the build-time variables that are -accessed like regular environment variables in the `RUN` instruction of the -Dockerfile. These values don't persist in the intermediate or final images -like `ENV` values do. You must add `--build-arg` for each build argument. - -Using this flag doesn't alter the output you see when the build process echoes the`ARG` lines from the -Dockerfile. - -For detailed information on using `ARG` and `ENV` instructions, see the -[Dockerfile reference](https://docs.docker.com/reference/dockerfile/). - -You can also use the `--build-arg` flag without a value, in which case the daemon -propagates the value from the local environment into the Docker container it's building: - -```console -$ export HTTP_PROXY=http://10.20.30.2:1234 -$ docker build --build-arg HTTP_PROXY . -``` - -This example is similar to how `docker run -e` works. Refer to the [`docker run` documentation](container_run.md#env) -for more information. - -### Optional security options (--security-opt) - -This flag is only supported on a daemon running on Windows, and only supports -the `credentialspec` option. The `credentialspec` must be in the format -`file://spec.txt` or `registry://keyname`. +## Examples ### Specify isolation technology for container (--isolation) @@ -450,199 +136,11 @@ Linux namespaces. On Microsoft Windows, you can specify these values: Specifying the `--isolation` flag without a value is the same as setting `--isolation="default"`. -### Add entries to container hosts file (--add-host) - -You can add other hosts into a build container's `/etc/hosts` file by using one -or more `--add-host` flags. This example adds static addresses for hosts named -`my-hostname` and `my_hostname_v6`: - -```console -$ docker build --add-host my_hostname=8.8.8.8 --add-host my_hostname_v6=2001:4860:4860::8888 . -``` - -If you need your build to connect to services running on the host, you can use -the special `host-gateway` value for `--add-host`. In the following example, -build containers resolve `host.docker.internal` to the host's gateway IP. - -```console -$ docker build --add-host host.docker.internal=host-gateway . -``` - -You can wrap an IPv6 address in square brackets. -`=` and `:` are both valid separators. -Both formats in the following example are valid: - -```console -$ docker build --add-host my-hostname:10.180.0.1 --add-host my-hostname_v6=[2001:4860:4860::8888] . -``` - -### Specifying target build stage (--target) - -When building a Dockerfile with multiple build stages, you can use the `--target` -option to specify an intermediate build stage by name as a final stage for the -resulting image. The daemon skips commands after the target stage. - -```dockerfile -FROM debian AS build-env -# ... - -FROM alpine AS production-env -# ... -``` - -```console -$ docker build -t mybuildimage --target build-env . -``` - -### Custom build outputs (--output) - -> **Note** -> -> This feature requires the BuildKit backend. You can either -> [enable BuildKit](https://docs.docker.com/build/buildkit/#getting-started) or -> use the [buildx](https://github.com/docker/buildx) plugin which provides more -> output type options. - -By default, a local container image is created from the build result. The -`--output` (or `-o`) flag allows you to override this behavior, and specify a -custom exporter. Custom exporters allow you to export the build -artifacts as files on the local filesystem instead of a Docker image, which can -be useful for generating local binaries, code generation etc. - -The value for `--output` is a CSV-formatted string defining the exporter type -and options that supports `local` and `tar` exporters. - -The `local` exporter writes the resulting build files to a directory on the client side. The -`tar` exporter is similar but writes the files as a single tarball (`.tar`). - -If you specify no type, the value defaults to the output directory of the local -exporter. Use a hyphen (`-`) to write the output tarball to standard output -(`STDOUT`). - -The following example builds an image using the current directory (`.`) as a build -context, and exports the files to a directory named `out` in the current directory. -If the directory does not exist, Docker creates the directory automatically: - -```console -$ docker build -o out . -``` - -The example above uses the short-hand syntax, omitting the `type` options, and -thus uses the default (`local`) exporter. The example below shows the equivalent -using the long-hand CSV syntax, specifying both `type` and `dest` (destination -path): - -```console -$ docker build --output type=local,dest=out . -``` - -Use the `tar` type to export the files as a `.tar` archive: - -```console -$ docker build --output type=tar,dest=out.tar . -``` - -The example below shows the equivalent when using the short-hand syntax. In this -case, `-` is specified as destination, which automatically selects the `tar` type, -and writes the output tarball to standard output, which is then redirected to -the `out.tar` file: - -```console -$ docker build -o - . > out.tar -``` - -The `--output` option exports all files from the target stage. A common pattern -for exporting only specific files is to do multi-stage builds and to copy the -desired files to a new scratch stage with [`COPY --from`](https://docs.docker.com/reference/dockerfile/#copy). - -The example, the `Dockerfile` below uses a separate stage to collect the -build artifacts for exporting: - -```dockerfile -FROM golang AS build-stage -RUN go get -u github.com/LK4D4/vndr - -FROM scratch AS export-stage -COPY --from=build-stage /go/bin/vndr / -``` - -When building the Dockerfile with the `-o` option, the command only exports the files from the final -stage to the `out` directory, in this case, the `vndr` binary: - -```console -$ docker build -o out . - -[+] Building 2.3s (7/7) FINISHED - => [internal] load build definition from Dockerfile 0.1s - => => transferring dockerfile: 176B 0.0s - => [internal] load .dockerignore 0.0s - => => transferring context: 2B 0.0s - => [internal] load metadata for docker.io/library/golang:latest 1.6s - => [build-stage 1/2] FROM docker.io/library/golang@sha256:2df96417dca0561bf1027742dcc5b446a18957cd28eba6aa79269f23f1846d3f 0.0s - => => resolve docker.io/library/golang@sha256:2df96417dca0561bf1027742dcc5b446a18957cd28eba6aa79269f23f1846d3f 0.0s - => CACHED [build-stage 2/2] RUN go get -u github.com/LK4D4/vndr 0.0s - => [export-stage 1/1] COPY --from=build-stage /go/bin/vndr / 0.2s - => exporting to client 0.4s - => => copying files 10.30MB 0.3s - -$ ls ./out -vndr -``` - -### Specifying external cache sources (--cache-from) - -> **Note** -> -> This feature requires the BuildKit backend. You can either -> [enable BuildKit](https://docs.docker.com/build/buildkit/#getting-started) or -> use the [buildx](https://github.com/docker/buildx) plugin. The previous -> builder has limited support for reusing cache from pre-pulled images. - -In addition to local build cache, the builder can reuse the cache generated from -previous builds with the `--cache-from` flag pointing to an image in the registry. - -To use an image as a cache source, cache metadata needs to be written into the -image on creation. You can do this by setting `--build-arg BUILDKIT_INLINE_CACHE=1` -when building the image. After that, you can use the built image as a cache source -for subsequent builds. - -Upon importing the cache, the builder only pulls the JSON metadata from the -registry and determine possible cache hits based on that information. If there -is a cache hit, the builder pulls the matched layers into the local environment. - -In addition to images, the cache can also be pulled from special cache manifests -generated by [`buildx`](https://github.com/docker/buildx) or the BuildKit CLI -(`buildctl`). These manifests (when built with the `type=registry` and `mode=max` -options) allow pulling layer data for intermediate stages in multi-stage builds. - -The following example builds an image with inline-cache metadata and pushes it -to a registry, then uses the image as a cache source on another machine: - -```console -$ docker build -t myname/myapp --build-arg BUILDKIT_INLINE_CACHE=1 . -$ docker push myname/myapp -``` - -After pushing the image, the image is used as cache source on another machine. -BuildKit automatically pulls the image from the registry if needed. - -On another machine: - -```console -$ docker build --cache-from myname/myapp . -``` - -### Set the networking mode for the RUN instructions during build (--network) - -#### Overview - -Available options for the networking mode are: - -- `default` (default): Run in the default network. -- `none`: Run with no network access. -- `host`: Run in the host’s network environment. +### Optional security options (--security-opt) -Find more details in the [Dockerfile documentation](https://docs.docker.com/reference/dockerfile/#run---network). +This flag is only supported on a daemon running on Windows, and only supports +the `credentialspec` option. The `credentialspec` must be in the format +`file://spec.txt` or `registry://keyname`. ### Squash an image's layers (--squash) (experimental) diff --git a/vendor.mod b/vendor.mod index 1e8df33a7c9d..a915e230e1ac 100644 --- a/vendor.mod +++ b/vendor.mod @@ -11,6 +11,7 @@ require ( github.com/containerd/platforms v0.2.1 github.com/creack/pty v1.1.21 github.com/distribution/reference v0.6.0 + github.com/docker/cli-docs-tool v0.7.0 github.com/docker/distribution v2.8.3+incompatible github.com/docker/docker v27.0.2+incompatible github.com/docker/docker-credential-helpers v0.8.2 diff --git a/vendor.sum b/vendor.sum index a10e2c966411..f4b87c8c8b83 100644 --- a/vendor.sum +++ b/vendor.sum @@ -54,6 +54,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/denisenkom/go-mssqldb v0.0.0-20191128021309-1d7a30a10f73/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/cli-docs-tool v0.7.0 h1:M2Da98Unz2kz3A5d4yeSGbhyOge2mfYSNjAFt01Rw0M= +github.com/docker/cli-docs-tool v0.7.0/go.mod h1:zMjqTFCU361PRh8apiXzeAZ1Q/xupbIwTusYpzCXS/o= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= diff --git a/vendor/github.com/docker/cli-docs-tool/LICENSE b/vendor/github.com/docker/cli-docs-tool/LICENSE new file mode 100644 index 000000000000..d64569567334 --- /dev/null +++ b/vendor/github.com/docker/cli-docs-tool/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/docker/cli-docs-tool/annotation/annotation.go b/vendor/github.com/docker/cli-docs-tool/annotation/annotation.go new file mode 100644 index 000000000000..021846af6e07 --- /dev/null +++ b/vendor/github.com/docker/cli-docs-tool/annotation/annotation.go @@ -0,0 +1,25 @@ +// Copyright 2021 cli-docs-tool authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package annotation + +const ( + // ExternalURL specifies an external link annotation + ExternalURL = "docs.external.url" + // CodeDelimiter specifies the char that will be converted as code backtick. + // Can be used on cmd for inheritance or a specific flag. + CodeDelimiter = "docs.code-delimiter" + // DefaultValue specifies the default value for a flag. + DefaultValue = "docs.default-value" +) diff --git a/vendor/modules.txt b/vendor/modules.txt index 064fe88e457a..7c3b68ffd25d 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -36,6 +36,9 @@ github.com/creack/pty # github.com/distribution/reference v0.6.0 ## explicit; go 1.20 github.com/distribution/reference +# github.com/docker/cli-docs-tool v0.7.0 +## explicit; go 1.18 +github.com/docker/cli-docs-tool/annotation # github.com/docker/distribution v2.8.3+incompatible ## explicit github.com/docker/distribution From 0ca7be015ed708e351158b35ff54d7613c1ac074 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Fri, 12 Apr 2024 10:59:28 +0200 Subject: [PATCH 04/50] docs: remove empty docker base command reference Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> (cherry picked from commit a683823383594cdc9a7464d52e98436e876316dc) Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- docs/reference/commandline/docker.md | 86 ---------------------------- 1 file changed, 86 deletions(-) delete mode 100644 docs/reference/commandline/docker.md diff --git a/docs/reference/commandline/docker.md b/docs/reference/commandline/docker.md deleted file mode 100644 index 288afdf8abff..000000000000 --- a/docs/reference/commandline/docker.md +++ /dev/null @@ -1,86 +0,0 @@ -# docker - - -The base command for the Docker CLI. - -### Subcommands - -| Name | Description | -|:------------------------------|:------------------------------------------------------------------------------| -| [`attach`](attach.md) | Attach local standard input, output, and error streams to a running container | -| [`build`](build.md) | Build an image from a Dockerfile | -| [`builder`](builder.md) | Manage builds | -| [`checkpoint`](checkpoint.md) | Manage checkpoints | -| [`commit`](commit.md) | Create a new image from a container's changes | -| [`config`](config.md) | Manage Swarm configs | -| [`container`](container.md) | Manage containers | -| [`context`](context.md) | Manage contexts | -| [`cp`](cp.md) | Copy files/folders between a container and the local filesystem | -| [`create`](create.md) | Create a new container | -| [`diff`](diff.md) | Inspect changes to files or directories on a container's filesystem | -| [`events`](events.md) | Get real time events from the server | -| [`exec`](exec.md) | Execute a command in a running container | -| [`export`](export.md) | Export a container's filesystem as a tar archive | -| [`history`](history.md) | Show the history of an image | -| [`image`](image.md) | Manage images | -| [`images`](images.md) | List images | -| [`import`](import.md) | Import the contents from a tarball to create a filesystem image | -| [`info`](info.md) | Display system-wide information | -| [`inspect`](inspect.md) | Return low-level information on Docker objects | -| [`kill`](kill.md) | Kill one or more running containers | -| [`load`](load.md) | Load an image from a tar archive or STDIN | -| [`login`](login.md) | Log in to a registry | -| [`logout`](logout.md) | Log out from a registry | -| [`logs`](logs.md) | Fetch the logs of a container | -| [`manifest`](manifest.md) | Manage Docker image manifests and manifest lists | -| [`network`](network.md) | Manage networks | -| [`node`](node.md) | Manage Swarm nodes | -| [`pause`](pause.md) | Pause all processes within one or more containers | -| [`plugin`](plugin.md) | Manage plugins | -| [`port`](port.md) | List port mappings or a specific mapping for the container | -| [`ps`](ps.md) | List containers | -| [`pull`](pull.md) | Download an image from a registry | -| [`push`](push.md) | Upload an image to a registry | -| [`rename`](rename.md) | Rename a container | -| [`restart`](restart.md) | Restart one or more containers | -| [`rm`](rm.md) | Remove one or more containers | -| [`rmi`](rmi.md) | Remove one or more images | -| [`run`](run.md) | Create and run a new container from an image | -| [`save`](save.md) | Save one or more images to a tar archive (streamed to STDOUT by default) | -| [`search`](search.md) | Search Docker Hub for images | -| [`secret`](secret.md) | Manage Swarm secrets | -| [`service`](service.md) | Manage Swarm services | -| [`stack`](stack.md) | Manage Swarm stacks | -| [`start`](start.md) | Start one or more stopped containers | -| [`stats`](stats.md) | Display a live stream of container(s) resource usage statistics | -| [`stop`](stop.md) | Stop one or more running containers | -| [`swarm`](swarm.md) | Manage Swarm | -| [`system`](system.md) | Manage Docker | -| [`tag`](tag.md) | Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE | -| [`top`](top.md) | Display the running processes of a container | -| [`trust`](trust.md) | Manage trust on Docker images | -| [`unpause`](unpause.md) | Unpause all processes within one or more containers | -| [`update`](update.md) | Update configuration of one or more containers | -| [`version`](version.md) | Show the Docker version information | -| [`volume`](volume.md) | Manage volumes | -| [`wait`](wait.md) | Block until one or more containers stop, then print their exit codes | - - -### Options - -| Name | Type | Default | Description | -|:--------------------|:---------|:-------------------------|:--------------------------------------------------------------------------------------------------------------------------------------| -| `--config` | `string` | `/root/.docker` | Location of client config files | -| `-c`, `--context` | `string` | | Name of the context to use to connect to the daemon (overrides DOCKER_HOST env var and default context set with `docker context use`) | -| `-D`, `--debug` | | | Enable debug mode | -| `-H`, `--host` | `list` | | Daemon socket to connect to | -| `-l`, `--log-level` | `string` | `info` | Set the logging level (`debug`, `info`, `warn`, `error`, `fatal`) | -| `--tls` | | | Use TLS; implied by --tlsverify | -| `--tlscacert` | `string` | `/root/.docker/ca.pem` | Trust certs signed only by this CA | -| `--tlscert` | `string` | `/root/.docker/cert.pem` | Path to TLS certificate file | -| `--tlskey` | `string` | `/root/.docker/key.pem` | Path to TLS key file | -| `--tlsverify` | | | Use TLS and verify the remote | - - - - From c964b80e53d441cb6bfb290265e5a485830798d6 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Fri, 12 Apr 2024 10:59:51 +0200 Subject: [PATCH 05/50] docs: rename cli.md to docker.md (base command) Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> (cherry picked from commit 03961449aa5fdb7c1b7778e68d20d0e55b910a59) Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- docs/reference/commandline/{cli.md => docker.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/reference/commandline/{cli.md => docker.md} (100%) diff --git a/docs/reference/commandline/cli.md b/docs/reference/commandline/docker.md similarity index 100% rename from docs/reference/commandline/cli.md rename to docs/reference/commandline/docker.md From 598442d37d6d8ac26bb5bb0127f24aa57b9474fb Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Fri, 12 Apr 2024 11:01:23 +0200 Subject: [PATCH 06/50] docs: remove frontmatter for base command Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> (cherry picked from commit cfea2353b38020066113e369e32e1dbbd87e66df) Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- docs/reference/commandline/docker.md | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/docs/reference/commandline/docker.md b/docs/reference/commandline/docker.md index c6bd54337a9b..e339c0cdb9e8 100644 --- a/docs/reference/commandline/docker.md +++ b/docs/reference/commandline/docker.md @@ -1,14 +1,7 @@ ---- -title: "Use the Docker command line" -description: "Docker's CLI command description and usage" -keywords: "Docker, Docker documentation, CLI, command line, config.json, CLI configuration file" -aliases: - - /reference/commandline/cli/ - - /engine/reference/commandline/engine/ - - /engine/reference/commandline/engine_activate/ - - /engine/reference/commandline/engine_check/ - - /engine/reference/commandline/engine_update/ ---- +# docker + + + The base command for the Docker CLI is `docker`. For information about the available flags and subcommands, refer to the [CLI reference](https://docs.docker.com/reference/cli/docker/) From c2b9c1474a72cb80f7a675164b50b0fb844f4b72 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Fri, 12 Apr 2024 11:06:28 +0200 Subject: [PATCH 07/50] docs: align heading structure for base command Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> (cherry picked from commit b0650f281e156f1a28bb353b5a0100fdfb954f44) Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- docs/reference/commandline/docker.md | 171 +++++++++++++-------------- 1 file changed, 85 insertions(+), 86 deletions(-) diff --git a/docs/reference/commandline/docker.md b/docs/reference/commandline/docker.md index e339c0cdb9e8..23d1a6bf48f8 100644 --- a/docs/reference/commandline/docker.md +++ b/docs/reference/commandline/docker.md @@ -3,8 +3,7 @@ -The base command for the Docker CLI is `docker`. For information about the -available flags and subcommands, refer to the [CLI reference](https://docs.docker.com/reference/cli/docker/) +## Description Depending on your Docker system configuration, you may be required to preface each `docker` command with `sudo`. To avoid having to use `sudo` with the @@ -14,7 +13,25 @@ each `docker` command with `sudo`. To avoid having to use `sudo` with the For more information about installing Docker or `sudo` configuration, refer to the [installation](https://docs.docker.com/install/) instructions for your operating system. -## Environment variables +### Display help text + +To list the help on any command just execute the command, followed by the +`--help` option. + +```console +$ docker run --help + +Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...] + +Create and run a new container from an image + +Options: + --add-host value Add a custom host-to-IP mapping (host:ip) (default []) + -a, --attach value Attach to STDIN, STDOUT or STDERR (default []) +<...> +``` + +### Environment variables The following list of environment variables are supported by the `docker` command line: @@ -46,7 +63,60 @@ variables used by the Go runtime. In particular, you may find these useful: See the [Go specification](https://pkg.go.dev/golang.org/x/net/http/httpproxy#Config) for details on these variables. -## Configuration files +### Option types + +Single character command line options can be combined, so rather than +typing `docker run -i -t --name test busybox sh`, +you can write `docker run -it --name test busybox sh`. + +#### Boolean + +Boolean options take the form `-d=false`. The value you see in the help text is +the default value which is set if you do **not** specify that flag. If you +specify a Boolean flag without a value, this will set the flag to `true`, +irrespective of the default value. + +For example, running `docker run -d` will set the value to `true`, so your +container **will** run in "detached" mode, in the background. + +Options which default to `true` (e.g., `docker build --rm=true`) can only be +set to the non-default value by explicitly setting them to `false`: + +```console +$ docker build --rm=false . +``` + +#### Multi + +You can specify options like `-a=[]` multiple times in a single command line, +for example in these commands: + +```console +$ docker run -a stdin -a stdout -i -t ubuntu /bin/bash + +$ docker run -a stdin -a stdout -a stderr ubuntu /bin/ls +``` + +Sometimes, multiple options can call for a more complex value string as for +`-v`: + +```console +$ docker run -v /host:/container example/mysql +``` + +> **Note** +> +> Do not use the `-t` and `-a stderr` options together due to +> limitations in the `pty` implementation. All `stderr` in `pty` mode +> simply goes to `stdout`. + +#### Strings and Integers + +Options like `--name=""` expect a string, and they +can only be specified once. Options like `-c=0` +expect an integer, and they can only be specified once. + +### Configuration files By default, the Docker command line stores its configuration files in a directory called `.docker` within your `$HOME` directory. @@ -63,7 +133,7 @@ and the `--config` flag are set, the flag takes precedent over the environment variable. Command line options override environment variables and environment variables override properties you specify in a `config.json` file. -### Change the `.docker` directory +#### Change the `.docker` directory To specify a different directory, use the `DOCKER_CONFIG` environment variable or the `--config` command line option. If both are @@ -84,7 +154,7 @@ directory to be `HOME/newdir/.docker`. $ echo export DOCKER_CONFIG=$HOME/newdir/.docker > ~/.profile ``` -## Docker CLI configuration file (`config.json`) properties +### Docker CLI configuration file (`config.json`) properties @@ -103,7 +173,7 @@ different location. > registries. Review your configuration file's content before sharing with others, > and prevent committing the file to version control. -### Customize the default output format for commands +#### Customize the default output format for commands These fields lets you customize the default output format for some commands if no `--format` flag is provided. @@ -123,14 +193,14 @@ if no `--format` flag is provided. | `tasksFormat` | Custom default format for `docker stack ps` output. See [`docker stack ps`](https://docs.docker.com/reference/cli/docker/stack/ps/#format) for a list of supported formatting directives. | | `volumesFormat` | Custom default format for `docker volume ls` output. See [`docker volume ls`](https://docs.docker.com/reference/cli/docker/volume/ls/#format) for a list of supported formatting directives. | -### Custom HTTP headers +#### Custom HTTP headers The property `HttpHeaders` specifies a set of headers to include in all messages sent from the Docker client to the daemon. Docker doesn't try to interpret or understand these headers; it simply puts them into the messages. Docker does not allow these headers to change any headers it sets for itself. -### Credential store options +#### Credential store options The property `credsStore` specifies an external binary to serve as the default credential store. When this property is set, `docker login` will attempt to @@ -146,7 +216,7 @@ credentials for specific registries. If this property is set, the binary for a specific registry. For more information, see the [**Credential helpers** section in the `docker login` documentation](https://docs.docker.com/reference/cli/docker/login/#credential-helpers) -### Automatic proxy configuration for containers +#### Automatic proxy configuration for containers The property `proxies` specifies proxy environment variables to be automatically set on containers, and set as `--build-arg` on containers used during `docker build`. @@ -176,7 +246,7 @@ sections for configuring proxy settings for the cli and daemon. > API or committed to an image when using `docker commit`. { .warning } -### Default key-sequence to detach from containers +#### Default key-sequence to detach from containers Once attached to a container, users detach from it and leave it running using the using `CTRL-p CTRL-q` key sequence. This detach key sequence is customizable @@ -196,13 +266,13 @@ Users can override your custom or the default key sequence on a per-container basis. To do this, the user specifies the `--detach-keys` flag with the `docker attach`, `docker exec`, `docker run` or `docker start` command. -### CLI plugin options +#### CLI plugin options The property `plugins` contains settings specific to CLI plugins. The key is the plugin name, while the value is a further map of options, which are specific to that plugin. -### Sample configuration file +#### Sample configuration file Following is a sample `config.json` file to illustrate the format used for various fields: @@ -252,7 +322,7 @@ various fields: } ``` -### Experimental features +#### Experimental features Experimental features provide early access to future product functionality. These features are intended for testing and feedback, and they may change @@ -261,7 +331,7 @@ between releases without warning or can be removed from a future release. Starting with Docker 20.10, experimental CLI features are enabled by default, and require no configuration to enable them. -### Notary +#### Notary If using your own notary server and a self-signed certificate or an internal Certificate Authority, you need to place the certificate at @@ -328,74 +398,3 @@ component to the end of the SSH address. ```console $ docker -H ssh://user@192.168.64.5/var/run/docker.sock ps ``` - -### Display help text - -To list the help on any command just execute the command, followed by the -`--help` option. - -```console -$ docker run --help - -Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...] - -Create and run a new container from an image - -Options: - --add-host value Add a custom host-to-IP mapping (host:ip) (default []) - -a, --attach value Attach to STDIN, STDOUT or STDERR (default []) -<...> -``` - -### Option types - -Single character command line options can be combined, so rather than -typing `docker run -i -t --name test busybox sh`, -you can write `docker run -it --name test busybox sh`. - -#### Boolean - -Boolean options take the form `-d=false`. The value you see in the help text is -the default value which is set if you do **not** specify that flag. If you -specify a Boolean flag without a value, this will set the flag to `true`, -irrespective of the default value. - -For example, running `docker run -d` will set the value to `true`, so your -container **will** run in "detached" mode, in the background. - -Options which default to `true` (e.g., `docker build --rm=true`) can only be -set to the non-default value by explicitly setting them to `false`: - -```console -$ docker build --rm=false . -``` - -#### Multi - -You can specify options like `-a=[]` multiple times in a single command line, -for example in these commands: - -```console -$ docker run -a stdin -a stdout -i -t ubuntu /bin/bash - -$ docker run -a stdin -a stdout -a stderr ubuntu /bin/ls -``` - -Sometimes, multiple options can call for a more complex value string as for -`-v`: - -```console -$ docker run -v /host:/container example/mysql -``` - -> **Note** -> -> Do not use the `-t` and `-a stderr` options together due to -> limitations in the `pty` implementation. All `stderr` in `pty` mode -> simply goes to `stdout`. - -#### Strings and Integers - -Options like `--name=""` expect a string, and they -can only be specified once. Options like `-c=0` -expect an integer, and they can only be specified once. From 1cf2c4efb3758a3622d591d6be10233e87feeeea Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Fri, 12 Apr 2024 11:08:08 +0200 Subject: [PATCH 08/50] docs: regenerate base command Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> (cherry picked from commit bf33c8f10ac8bbc32e977f22d861c3118638bfd3) Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- docs/reference/commandline/docker.md | 81 ++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/docs/reference/commandline/docker.md b/docs/reference/commandline/docker.md index 23d1a6bf48f8..3bfdffb1804d 100644 --- a/docs/reference/commandline/docker.md +++ b/docs/reference/commandline/docker.md @@ -1,6 +1,87 @@ # docker +The base command for the Docker CLI. + +### Subcommands + +| Name | Description | +|:------------------------------|:------------------------------------------------------------------------------| +| [`attach`](attach.md) | Attach local standard input, output, and error streams to a running container | +| [`build`](build.md) | Build an image from a Dockerfile | +| [`builder`](builder.md) | Manage builds | +| [`checkpoint`](checkpoint.md) | Manage checkpoints | +| [`commit`](commit.md) | Create a new image from a container's changes | +| [`config`](config.md) | Manage Swarm configs | +| [`container`](container.md) | Manage containers | +| [`context`](context.md) | Manage contexts | +| [`cp`](cp.md) | Copy files/folders between a container and the local filesystem | +| [`create`](create.md) | Create a new container | +| [`diff`](diff.md) | Inspect changes to files or directories on a container's filesystem | +| [`events`](events.md) | Get real time events from the server | +| [`exec`](exec.md) | Execute a command in a running container | +| [`export`](export.md) | Export a container's filesystem as a tar archive | +| [`history`](history.md) | Show the history of an image | +| [`image`](image.md) | Manage images | +| [`images`](images.md) | List images | +| [`import`](import.md) | Import the contents from a tarball to create a filesystem image | +| [`info`](info.md) | Display system-wide information | +| [`inspect`](inspect.md) | Return low-level information on Docker objects | +| [`kill`](kill.md) | Kill one or more running containers | +| [`load`](load.md) | Load an image from a tar archive or STDIN | +| [`login`](login.md) | Log in to a registry | +| [`logout`](logout.md) | Log out from a registry | +| [`logs`](logs.md) | Fetch the logs of a container | +| [`manifest`](manifest.md) | Manage Docker image manifests and manifest lists | +| [`network`](network.md) | Manage networks | +| [`node`](node.md) | Manage Swarm nodes | +| [`pause`](pause.md) | Pause all processes within one or more containers | +| [`plugin`](plugin.md) | Manage plugins | +| [`port`](port.md) | List port mappings or a specific mapping for the container | +| [`ps`](ps.md) | List containers | +| [`pull`](pull.md) | Download an image from a registry | +| [`push`](push.md) | Upload an image to a registry | +| [`rename`](rename.md) | Rename a container | +| [`restart`](restart.md) | Restart one or more containers | +| [`rm`](rm.md) | Remove one or more containers | +| [`rmi`](rmi.md) | Remove one or more images | +| [`run`](run.md) | Create and run a new container from an image | +| [`save`](save.md) | Save one or more images to a tar archive (streamed to STDOUT by default) | +| [`search`](search.md) | Search Docker Hub for images | +| [`secret`](secret.md) | Manage Swarm secrets | +| [`service`](service.md) | Manage Swarm services | +| [`stack`](stack.md) | Manage Swarm stacks | +| [`start`](start.md) | Start one or more stopped containers | +| [`stats`](stats.md) | Display a live stream of container(s) resource usage statistics | +| [`stop`](stop.md) | Stop one or more running containers | +| [`swarm`](swarm.md) | Manage Swarm | +| [`system`](system.md) | Manage Docker | +| [`tag`](tag.md) | Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE | +| [`top`](top.md) | Display the running processes of a container | +| [`trust`](trust.md) | Manage trust on Docker images | +| [`unpause`](unpause.md) | Unpause all processes within one or more containers | +| [`update`](update.md) | Update configuration of one or more containers | +| [`version`](version.md) | Show the Docker version information | +| [`volume`](volume.md) | Manage volumes | +| [`wait`](wait.md) | Block until one or more containers stop, then print their exit codes | + + +### Options + +| Name | Type | Default | Description | +|:---------------------------------|:---------|:-------------------------|:--------------------------------------------------------------------------------------------------------------------------------------| +| `--config` | `string` | `/root/.docker` | Location of client config files | +| `-c`, `--context` | `string` | | Name of the context to use to connect to the daemon (overrides DOCKER_HOST env var and default context set with `docker context use`) | +| `-D`, `--debug` | | | Enable debug mode | +| [`-H`](#host), [`--host`](#host) | `list` | | Daemon socket to connect to | +| `-l`, `--log-level` | `string` | `info` | Set the logging level (`debug`, `info`, `warn`, `error`, `fatal`) | +| `--tls` | | | Use TLS; implied by --tlsverify | +| `--tlscacert` | `string` | `/root/.docker/ca.pem` | Trust certs signed only by this CA | +| `--tlscert` | `string` | `/root/.docker/cert.pem` | Path to TLS certificate file | +| `--tlskey` | `string` | `/root/.docker/key.pem` | Path to TLS key file | +| `--tlsverify` | | | Use TLS and verify the remote | + + ## Description From eea26c50dd5e23744f893b294f81fb0fdec477be Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Fri, 12 Apr 2024 11:10:58 +0200 Subject: [PATCH 09/50] docs: update links to docker cli reference Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> (cherry picked from commit 3d4c12af73c1cfef7c4425926b3a51a077c66e1b) Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- docs/extend/index.md | 2 +- docs/reference/commandline/container_attach.md | 2 +- docs/reference/commandline/container_run.md | 2 +- docs/reference/commandline/index.md | 2 +- docs/reference/dockerd.md | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/extend/index.md b/docs/extend/index.md index c90a42cb4f7e..7264d59bae84 100644 --- a/docs/extend/index.md +++ b/docs/extend/index.md @@ -117,7 +117,7 @@ enabled, and use it to create a volume. To disable a plugin, use the `docker plugin disable` command. To completely remove it, use the `docker plugin remove` command. For other available commands and options, see the -[command line reference](https://docs.docker.com/engine/reference/commandline/cli/). +[command line reference](https://docs.docker.com/reference/cli/docker/). ## Developing a plugin diff --git a/docs/reference/commandline/container_attach.md b/docs/reference/commandline/container_attach.md index beb6ab4c80f9..58118880967d 100644 --- a/docs/reference/commandline/container_attach.md +++ b/docs/reference/commandline/container_attach.md @@ -164,4 +164,4 @@ the following: These `a`, `ctrl-a`, `X`, or `ctrl-\\` values are all examples of valid key sequences. To configure a different configuration default key sequence for all -containers, see [**Configuration file** section](https://docs.docker.com/engine/reference/commandline/cli/#configuration-files). +containers, see [**Configuration file** section](https://docs.docker.com/reference/cli/docker/#configuration-files). diff --git a/docs/reference/commandline/container_run.md b/docs/reference/commandline/container_run.md index 79b557d81d96..27b4eb42e4df 100644 --- a/docs/reference/commandline/container_run.md +++ b/docs/reference/commandline/container_run.md @@ -869,7 +869,7 @@ the following: These `a`, `ctrl-a`, `X`, or `ctrl-\\` values are all examples of valid key sequences. To configure a different configuration default key sequence for all -containers, see [**Configuration file** section](https://docs.docker.com/engine/reference/commandline/cli/#configuration-files). +containers, see [**Configuration file** section](https://docs.docker.com/reference/cli/docker/#configuration-files). ### Add host device to container (--device) diff --git a/docs/reference/commandline/index.md b/docs/reference/commandline/index.md index 7e20fd060802..2ad643c74e90 100644 --- a/docs/reference/commandline/index.md +++ b/docs/reference/commandline/index.md @@ -10,7 +10,7 @@ identifier: "smn_cli_guide" This section contains reference information on using Docker's command line client. Each command has a reference page along with samples. If you are unfamiliar with the command line, you should start by reading about how to [Use -the Docker command line](https://docs.docker.com/engine/reference/commandline/cli/). +the Docker command line](https://docs.docker.com/reference/cli/docker/). You start the Docker daemon with the command line. How you start the daemon affects your Docker containers. For that reason you should also make sure to diff --git a/docs/reference/dockerd.md b/docs/reference/dockerd.md index f8bf348d54e3..89de47e0ae22 100644 --- a/docs/reference/dockerd.md +++ b/docs/reference/dockerd.md @@ -133,16 +133,16 @@ 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) in the CLI section to learn about environment variables supported by the `docker` CLI. | Variable | Description | | :------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `DOCKER_CERT_PATH` | Location of your authentication keys. This variable is used both by the [`docker` CLI](https://docs.docker.com/engine/reference/commandline/cli/) and the `dockerd` daemon. | +| `DOCKER_CERT_PATH` | Location of your authentication keys. This variable is used both by the [`docker` CLI](https://docs.docker.com/reference/cli/docker/) and the `dockerd` daemon. | | `DOCKER_DRIVER` | The storage driver to use. | | `DOCKER_RAMDISK` | If set this disables `pivot_root`. | -| `DOCKER_TLS_VERIFY` | When set Docker uses TLS and verifies the remote. This variable is used both by the [`docker` CLI](https://docs.docker.com/engine/reference/commandline/cli/) and the `dockerd` daemon. | +| `DOCKER_TLS_VERIFY` | When set Docker uses TLS and verifies the remote. This variable is used both by the [`docker` CLI](https://docs.docker.com/reference/cli/docker/) and the `dockerd` daemon. | | `DOCKER_TMPDIR` | Location for temporary files created by the daemon. | | `HTTP_PROXY` | Proxy URL for HTTP requests unless overridden by NoProxy. See the [Go specification](https://pkg.go.dev/golang.org/x/net/http/httpproxy#Config) for details. | | `HTTPS_PROXY` | Proxy URL for HTTPS requests unless overridden by NoProxy. See the [Go specification](https://pkg.go.dev/golang.org/x/net/http/httpproxy#Config) for details. | From c777dd16df7e5b935eb4a61bf87ac55c710b031b Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Wed, 3 Jul 2024 08:28:42 +0200 Subject: [PATCH 10/50] docs: update cli-docs-tool (v0.8.0) Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> (cherry picked from commit 8549d250f69a4f16e3084b698927cfcfe7f54bc2) Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- scripts/docs/generate-md.sh | 2 +- scripts/docs/generate-yaml.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/docs/generate-md.sh b/scripts/docs/generate-md.sh index 4caa01eaed23..dda38eb2121c 100755 --- a/scripts/docs/generate-md.sh +++ b/scripts/docs/generate-md.sh @@ -2,7 +2,7 @@ set -eu -: "${CLI_DOCS_TOOL_VERSION=v0.7.0}" +: "${CLI_DOCS_TOOL_VERSION=v0.8.0}" export GO111MODULE=auto diff --git a/scripts/docs/generate-yaml.sh b/scripts/docs/generate-yaml.sh index 0d67c5e5bb09..b9b24a771a0b 100755 --- a/scripts/docs/generate-yaml.sh +++ b/scripts/docs/generate-yaml.sh @@ -2,7 +2,7 @@ set -eu -: "${CLI_DOCS_TOOL_VERSION=v0.7.0}" +: "${CLI_DOCS_TOOL_VERSION=v0.8.0}" export GO111MODULE=auto From 0a8bb6e5b4bbbed960f33dc1c0cbe829e487dd23 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Wed, 3 Jul 2024 08:29:57 +0200 Subject: [PATCH 11/50] chore: regenerate docs Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> (cherry picked from commit dc22572e3ebee23b2a1435141217ff55b492f1ca) Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- docs/reference/commandline/attach.md | 2 +- docs/reference/commandline/build.md | 12 +++++----- docs/reference/commandline/builder_build.md | 12 +++++----- docs/reference/commandline/builder_prune.md | 4 ++-- .../commandline/checkpoint_create.md | 2 +- docs/reference/commandline/config_inspect.md | 2 +- docs/reference/commandline/config_ls.md | 2 +- .../reference/commandline/container_attach.md | 2 +- docs/reference/commandline/container_cp.md | 10 ++++---- .../reference/commandline/container_create.md | 22 ++++++++--------- docs/reference/commandline/container_exec.md | 8 +++---- .../commandline/container_inspect.md | 2 +- docs/reference/commandline/container_logs.md | 6 ++--- docs/reference/commandline/container_ls.md | 10 ++++---- docs/reference/commandline/container_prune.md | 2 +- docs/reference/commandline/container_rm.md | 10 ++++---- docs/reference/commandline/container_run.md | 24 +++++++++---------- docs/reference/commandline/container_start.md | 4 ++-- docs/reference/commandline/container_stats.md | 6 ++--- docs/reference/commandline/context_ls.md | 2 +- docs/reference/commandline/context_rm.md | 6 ++--- docs/reference/commandline/cp.md | 10 ++++---- docs/reference/commandline/create.md | 22 ++++++++--------- docs/reference/commandline/docker.md | 6 ++--- docs/reference/commandline/exec.md | 8 +++---- docs/reference/commandline/history.md | 4 ++-- docs/reference/commandline/image_build.md | 12 +++++----- docs/reference/commandline/image_history.md | 4 ++-- docs/reference/commandline/image_load.md | 2 +- docs/reference/commandline/image_ls.md | 8 +++---- docs/reference/commandline/image_prune.md | 4 ++-- docs/reference/commandline/image_pull.md | 4 ++-- docs/reference/commandline/image_push.md | 4 ++-- docs/reference/commandline/image_rm.md | 8 +++---- docs/reference/commandline/images.md | 8 +++---- docs/reference/commandline/inspect.md | 2 +- docs/reference/commandline/load.md | 2 +- docs/reference/commandline/login.md | 2 +- docs/reference/commandline/logs.md | 6 ++--- docs/reference/commandline/manifest_create.md | 8 +++---- .../reference/commandline/manifest_inspect.md | 8 +++---- docs/reference/commandline/manifest_push.md | 8 +++---- docs/reference/commandline/network_create.md | 10 ++++---- .../commandline/network_disconnect.md | 6 ++--- docs/reference/commandline/network_inspect.md | 2 +- docs/reference/commandline/network_ls.md | 4 ++-- docs/reference/commandline/network_prune.md | 2 +- docs/reference/commandline/network_rm.md | 6 ++--- docs/reference/commandline/node_inspect.md | 2 +- docs/reference/commandline/node_ls.md | 2 +- docs/reference/commandline/node_ps.md | 6 ++--- docs/reference/commandline/node_rm.md | 6 ++--- docs/reference/commandline/plugin_create.md | 6 ++--- docs/reference/commandline/plugin_disable.md | 6 ++--- docs/reference/commandline/plugin_install.md | 4 ++-- docs/reference/commandline/plugin_ls.md | 4 ++-- docs/reference/commandline/plugin_rm.md | 6 ++--- docs/reference/commandline/plugin_upgrade.md | 4 ++-- docs/reference/commandline/ps.md | 10 ++++---- docs/reference/commandline/pull.md | 4 ++-- docs/reference/commandline/push.md | 4 ++-- docs/reference/commandline/rm.md | 10 ++++---- docs/reference/commandline/rmi.md | 8 +++---- docs/reference/commandline/run.md | 24 +++++++++---------- docs/reference/commandline/search.md | 2 +- docs/reference/commandline/secret_inspect.md | 2 +- docs/reference/commandline/secret_ls.md | 2 +- docs/reference/commandline/service_create.md | 16 ++++++------- docs/reference/commandline/service_inspect.md | 2 +- docs/reference/commandline/service_logs.md | 14 +++++------ docs/reference/commandline/service_ls.md | 2 +- docs/reference/commandline/service_ps.md | 6 ++--- .../reference/commandline/service_rollback.md | 8 +++---- docs/reference/commandline/service_scale.md | 6 ++--- docs/reference/commandline/service_update.md | 20 ++++++++-------- docs/reference/commandline/stack_config.md | 2 +- docs/reference/commandline/stack_deploy.md | 6 ++--- docs/reference/commandline/stack_ps.md | 6 ++--- docs/reference/commandline/stack_services.md | 2 +- docs/reference/commandline/start.md | 4 ++-- docs/reference/commandline/stats.md | 6 ++--- docs/reference/commandline/swarm_ca.md | 6 ++--- docs/reference/commandline/swarm_init.md | 4 ++-- .../reference/commandline/swarm_join-token.md | 8 +++---- docs/reference/commandline/swarm_leave.md | 6 ++--- .../reference/commandline/swarm_unlock-key.md | 8 +++---- docs/reference/commandline/swarm_update.md | 2 +- docs/reference/commandline/system_df.md | 2 +- docs/reference/commandline/system_prune.md | 6 ++--- docs/reference/commandline/trust_inspect.md | 6 ++--- docs/reference/commandline/trust_revoke.md | 6 ++--- docs/reference/commandline/trust_sign.md | 6 ++--- .../commandline/trust_signer_remove.md | 6 ++--- docs/reference/commandline/volume_ls.md | 4 ++-- docs/reference/commandline/volume_prune.md | 4 ++-- docs/reference/commandline/volume_rm.md | 6 ++--- 96 files changed, 306 insertions(+), 306 deletions(-) diff --git a/docs/reference/commandline/attach.md b/docs/reference/commandline/attach.md index 3a89574075b9..09ceeeaca785 100644 --- a/docs/reference/commandline/attach.md +++ b/docs/reference/commandline/attach.md @@ -12,7 +12,7 @@ Attach local standard input, output, and error streams to a running container | Name | Type | Default | Description | |:----------------|:---------|:--------|:----------------------------------------------------| | `--detach-keys` | `string` | | Override the key sequence for detaching a container | -| `--no-stdin` | | | Do not attach STDIN | +| `--no-stdin` | `bool` | | Do not attach STDIN | | `--sig-proxy` | `bool` | `true` | Proxy all received signals to the process | diff --git a/docs/reference/commandline/build.md b/docs/reference/commandline/build.md index e2f4765a4408..dca5ee76ab84 100644 --- a/docs/reference/commandline/build.md +++ b/docs/reference/commandline/build.md @@ -15,7 +15,7 @@ Build an image from a Dockerfile | [`--build-arg`](https://docs.docker.com/reference/cli/docker/buildx/build/#build-arg) | `list` | | Set build-time variables | | `--cache-from` | `stringSlice` | | Images to consider as cache sources | | [`--cgroup-parent`](https://docs.docker.com/reference/cli/docker/buildx/build/#cgroup-parent) | `string` | | Set the parent cgroup for the `RUN` instructions during build | -| `--compress` | | | Compress the build context using gzip | +| `--compress` | `bool` | | Compress the build context using gzip | | `--cpu-period` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) period | | `--cpu-quota` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) quota | | `-c`, `--cpu-shares` | `int64` | `0` | CPU shares (relative weight) | @@ -23,21 +23,21 @@ Build an image from a Dockerfile | `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) | | `--disable-content-trust` | `bool` | `true` | Skip image verification | | [`-f`](https://docs.docker.com/reference/cli/docker/buildx/build/#file), [`--file`](https://docs.docker.com/reference/cli/docker/buildx/build/#file) | `string` | | Name of the Dockerfile (Default is `PATH/Dockerfile`) | -| `--force-rm` | | | Always remove intermediate containers | +| `--force-rm` | `bool` | | Always remove intermediate containers | | `--iidfile` | `string` | | Write the image ID to the file | | `--isolation` | `string` | | Container isolation technology | | `--label` | `list` | | Set metadata for an image | | `-m`, `--memory` | `bytes` | `0` | Memory limit | | `--memory-swap` | `bytes` | `0` | Swap limit equal to memory plus swap: -1 to enable unlimited swap | | [`--network`](https://docs.docker.com/reference/cli/docker/buildx/build/#network) | `string` | `default` | Set the networking mode for the RUN instructions during build | -| `--no-cache` | | | Do not use cache when building the image | +| `--no-cache` | `bool` | | Do not use cache when building the image | | `--platform` | `string` | | Set platform if server is multi-platform capable | -| `--pull` | | | Always attempt to pull a newer version of the image | -| `-q`, `--quiet` | | | Suppress the build output and print image ID on success | +| `--pull` | `bool` | | Always attempt to pull a newer version of the image | +| `-q`, `--quiet` | `bool` | | Suppress the build output and print image ID on success | | `--rm` | `bool` | `true` | Remove intermediate containers after a successful build | | `--security-opt` | `stringSlice` | | Security options | | `--shm-size` | `bytes` | `0` | Size of `/dev/shm` | -| `--squash` | | | Squash newly built layers into a single new layer | +| `--squash` | `bool` | | Squash newly built layers into a single new layer | | [`-t`](https://docs.docker.com/reference/cli/docker/buildx/build/#tag), [`--tag`](https://docs.docker.com/reference/cli/docker/buildx/build/#tag) | `list` | | Name and optionally a tag in the `name:tag` format | | [`--target`](https://docs.docker.com/reference/cli/docker/buildx/build/#target) | `string` | | Set the target build stage to build. | | `--ulimit` | `ulimit` | | Ulimit options | diff --git a/docs/reference/commandline/builder_build.md b/docs/reference/commandline/builder_build.md index 53da887d9c84..ad9c09532159 100644 --- a/docs/reference/commandline/builder_build.md +++ b/docs/reference/commandline/builder_build.md @@ -15,7 +15,7 @@ Build an image from a Dockerfile | [`--build-arg`](https://docs.docker.com/reference/cli/docker/buildx/build/#build-arg) | `list` | | Set build-time variables | | `--cache-from` | `stringSlice` | | Images to consider as cache sources | | [`--cgroup-parent`](https://docs.docker.com/reference/cli/docker/buildx/build/#cgroup-parent) | `string` | | Set the parent cgroup for the `RUN` instructions during build | -| `--compress` | | | Compress the build context using gzip | +| `--compress` | `bool` | | Compress the build context using gzip | | `--cpu-period` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) period | | `--cpu-quota` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) quota | | `-c`, `--cpu-shares` | `int64` | `0` | CPU shares (relative weight) | @@ -23,21 +23,21 @@ Build an image from a Dockerfile | `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) | | `--disable-content-trust` | `bool` | `true` | Skip image verification | | [`-f`](https://docs.docker.com/reference/cli/docker/buildx/build/#file), [`--file`](https://docs.docker.com/reference/cli/docker/buildx/build/#file) | `string` | | Name of the Dockerfile (Default is `PATH/Dockerfile`) | -| `--force-rm` | | | Always remove intermediate containers | +| `--force-rm` | `bool` | | Always remove intermediate containers | | `--iidfile` | `string` | | Write the image ID to the file | | `--isolation` | `string` | | Container isolation technology | | `--label` | `list` | | Set metadata for an image | | `-m`, `--memory` | `bytes` | `0` | Memory limit | | `--memory-swap` | `bytes` | `0` | Swap limit equal to memory plus swap: -1 to enable unlimited swap | | [`--network`](https://docs.docker.com/reference/cli/docker/buildx/build/#network) | `string` | `default` | Set the networking mode for the RUN instructions during build | -| `--no-cache` | | | Do not use cache when building the image | +| `--no-cache` | `bool` | | Do not use cache when building the image | | `--platform` | `string` | | Set platform if server is multi-platform capable | -| `--pull` | | | Always attempt to pull a newer version of the image | -| `-q`, `--quiet` | | | Suppress the build output and print image ID on success | +| `--pull` | `bool` | | Always attempt to pull a newer version of the image | +| `-q`, `--quiet` | `bool` | | Suppress the build output and print image ID on success | | `--rm` | `bool` | `true` | Remove intermediate containers after a successful build | | `--security-opt` | `stringSlice` | | Security options | | `--shm-size` | `bytes` | `0` | Size of `/dev/shm` | -| `--squash` | | | Squash newly built layers into a single new layer | +| `--squash` | `bool` | | Squash newly built layers into a single new layer | | [`-t`](https://docs.docker.com/reference/cli/docker/buildx/build/#tag), [`--tag`](https://docs.docker.com/reference/cli/docker/buildx/build/#tag) | `list` | | Name and optionally a tag in the `name:tag` format | | [`--target`](https://docs.docker.com/reference/cli/docker/buildx/build/#target) | `string` | | Set the target build stage to build. | | `--ulimit` | `ulimit` | | Ulimit options | diff --git a/docs/reference/commandline/builder_prune.md b/docs/reference/commandline/builder_prune.md index a90d58d39a08..8dbbfbd8d220 100644 --- a/docs/reference/commandline/builder_prune.md +++ b/docs/reference/commandline/builder_prune.md @@ -7,9 +7,9 @@ Remove build cache | Name | Type | Default | Description | |:-----------------|:---------|:--------|:------------------------------------------------------| -| `-a`, `--all` | | | Remove all unused build cache, not just dangling ones | +| `-a`, `--all` | `bool` | | Remove all unused build cache, not just dangling ones | | `--filter` | `filter` | | Provide filter values (e.g. `until=24h`) | -| `-f`, `--force` | | | Do not prompt for confirmation | +| `-f`, `--force` | `bool` | | Do not prompt for confirmation | | `--keep-storage` | `bytes` | `0` | Amount of disk space to keep for cache | diff --git a/docs/reference/commandline/checkpoint_create.md b/docs/reference/commandline/checkpoint_create.md index f59e259527f5..650d5973e270 100644 --- a/docs/reference/commandline/checkpoint_create.md +++ b/docs/reference/commandline/checkpoint_create.md @@ -8,7 +8,7 @@ Create a checkpoint from a running container | Name | Type | Default | Description | |:-------------------|:---------|:--------|:---------------------------------------------| | `--checkpoint-dir` | `string` | | Use a custom checkpoint storage directory | -| `--leave-running` | | | Leave the container running after checkpoint | +| `--leave-running` | `bool` | | Leave the container running after checkpoint | diff --git a/docs/reference/commandline/config_inspect.md b/docs/reference/commandline/config_inspect.md index 5758d3dbec16..9d2a14db490f 100644 --- a/docs/reference/commandline/config_inspect.md +++ b/docs/reference/commandline/config_inspect.md @@ -8,7 +8,7 @@ Display detailed information on one or more configs | Name | Type | Default | Description | |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`-f`](#format), [`--format`](#format) | `string` | | Format output using a custom template:
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | -| `--pretty` | | | Print the information in a human friendly format | +| `--pretty` | `bool` | | Print the information in a human friendly format | diff --git a/docs/reference/commandline/config_ls.md b/docs/reference/commandline/config_ls.md index be9ddb74116a..2911063f64e4 100644 --- a/docs/reference/commandline/config_ls.md +++ b/docs/reference/commandline/config_ls.md @@ -13,7 +13,7 @@ List configs |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided | | [`--format`](#format) | `string` | | Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | -| `-q`, `--quiet` | | | Only display IDs | +| `-q`, `--quiet` | `bool` | | Only display IDs | diff --git a/docs/reference/commandline/container_attach.md b/docs/reference/commandline/container_attach.md index 58118880967d..5f1b1e99aaf1 100644 --- a/docs/reference/commandline/container_attach.md +++ b/docs/reference/commandline/container_attach.md @@ -12,7 +12,7 @@ Attach local standard input, output, and error streams to a running container | Name | Type | Default | Description | |:--------------------------------|:---------|:--------|:----------------------------------------------------| | [`--detach-keys`](#detach-keys) | `string` | | Override the key sequence for detaching a container | -| `--no-stdin` | | | Do not attach STDIN | +| `--no-stdin` | `bool` | | Do not attach STDIN | | `--sig-proxy` | `bool` | `true` | Proxy all received signals to the process | diff --git a/docs/reference/commandline/container_cp.md b/docs/reference/commandline/container_cp.md index 3aebacabdbf3..9a6166625988 100644 --- a/docs/reference/commandline/container_cp.md +++ b/docs/reference/commandline/container_cp.md @@ -14,11 +14,11 @@ container source to stdout. ### Options -| Name | Type | Default | Description | -|:----------------------|:-----|:--------|:-------------------------------------------------------------------------------------------------------------| -| `-a`, `--archive` | | | Archive mode (copy all uid/gid information) | -| `-L`, `--follow-link` | | | Always follow symbol link in SRC_PATH | -| `-q`, `--quiet` | | | Suppress progress output during copy. Progress output is automatically suppressed if no terminal is attached | +| Name | Type | Default | Description | +|:----------------------|:-------|:--------|:-------------------------------------------------------------------------------------------------------------| +| `-a`, `--archive` | `bool` | | Archive mode (copy all uid/gid information) | +| `-L`, `--follow-link` | `bool` | | Always follow symbol link in SRC_PATH | +| `-q`, `--quiet` | `bool` | | Suppress progress output during copy. Progress output is automatically suppressed if no terminal is attached | diff --git a/docs/reference/commandline/container_create.md b/docs/reference/commandline/container_create.md index dc76075ad389..a2394eab28c2 100644 --- a/docs/reference/commandline/container_create.md +++ b/docs/reference/commandline/container_create.md @@ -54,10 +54,10 @@ Create a new container | `--health-start-interval` | `duration` | `0s` | Time between running the check during the start period (ms\|s\|m\|h) (default 0s) | | `--health-start-period` | `duration` | `0s` | Start period for the container to initialize before starting health-retries countdown (ms\|s\|m\|h) (default 0s) | | `--health-timeout` | `duration` | `0s` | Maximum time to allow one check to run (ms\|s\|m\|h) (default 0s) | -| `--help` | | | Print usage | +| `--help` | `bool` | | Print usage | | `-h`, `--hostname` | `string` | | Container host name | -| `--init` | | | Run an init inside the container that forwards signals and reaps processes | -| `-i`, `--interactive` | | | Keep STDIN open even if not attached | +| `--init` | `bool` | | Run an init inside the container that forwards signals and reaps processes | +| `-i`, `--interactive` | `bool` | | Keep STDIN open even if not attached | | `--io-maxbandwidth` | `bytes` | `0` | Maximum IO bandwidth limit for the system drive (Windows only) | | `--io-maxiops` | `uint64` | `0` | Maximum IOps limit for the system drive (Windows only) | | `--ip` | `string` | | IPv4 address (e.g., 172.30.100.104) | @@ -80,20 +80,20 @@ Create a new container | `--name` | `string` | | Assign a name to the container | | `--network` | `network` | | Connect a container to a network | | `--network-alias` | `list` | | Add network-scoped alias for the container | -| `--no-healthcheck` | | | Disable any container-specified HEALTHCHECK | -| `--oom-kill-disable` | | | Disable OOM Killer | +| `--no-healthcheck` | `bool` | | Disable any container-specified HEALTHCHECK | +| `--oom-kill-disable` | `bool` | | Disable OOM Killer | | `--oom-score-adj` | `int` | `0` | Tune host's OOM preferences (-1000 to 1000) | | `--pid` | `string` | | PID namespace to use | | `--pids-limit` | `int64` | `0` | Tune container pids limit (set -1 for unlimited) | | `--platform` | `string` | | Set platform if server is multi-platform capable | -| `--privileged` | | | Give extended privileges to this container | +| `--privileged` | `bool` | | Give extended privileges to this container | | `-p`, `--publish` | `list` | | Publish a container's port(s) to the host | -| `-P`, `--publish-all` | | | Publish all exposed ports to random ports | +| `-P`, `--publish-all` | `bool` | | Publish all exposed ports to random ports | | `--pull` | `string` | `missing` | Pull image before creating (`always`, `\|missing`, `never`) | -| `-q`, `--quiet` | | | Suppress the pull output | -| `--read-only` | | | Mount the container's root filesystem as read only | +| `-q`, `--quiet` | `bool` | | Suppress the pull output | +| `--read-only` | `bool` | | Mount the container's root filesystem as read only | | `--restart` | `string` | `no` | Restart policy to apply when a container exits | -| `--rm` | | | Automatically remove the container and its associated anonymous volumes when it exits | +| `--rm` | `bool` | | Automatically remove the container and its associated anonymous volumes when it exits | | `--runtime` | `string` | | Runtime to use for this container | | `--security-opt` | `list` | | Security Options | | `--shm-size` | `bytes` | `0` | Size of /dev/shm | @@ -102,7 +102,7 @@ Create a new container | `--storage-opt` | `list` | | Storage driver options for the container | | `--sysctl` | `map` | `map[]` | Sysctl options | | `--tmpfs` | `list` | | Mount a tmpfs directory | -| `-t`, `--tty` | | | Allocate a pseudo-TTY | +| `-t`, `--tty` | `bool` | | Allocate a pseudo-TTY | | `--ulimit` | `ulimit` | | Ulimit options | | `-u`, `--user` | `string` | | Username or UID (format: [:]) | | `--userns` | `string` | | User namespace to use | diff --git a/docs/reference/commandline/container_exec.md b/docs/reference/commandline/container_exec.md index 896c05ae6c40..7aeea01b6edf 100644 --- a/docs/reference/commandline/container_exec.md +++ b/docs/reference/commandline/container_exec.md @@ -11,13 +11,13 @@ Execute a command in a running container | Name | Type | Default | Description | |:------------------------------------------|:---------|:--------|:-------------------------------------------------------| -| `-d`, `--detach` | | | Detached mode: run command in the background | +| `-d`, `--detach` | `bool` | | Detached mode: run command in the background | | `--detach-keys` | `string` | | Override the key sequence for detaching a container | | [`-e`](#env), [`--env`](#env) | `list` | | Set environment variables | | `--env-file` | `list` | | Read in a file of environment variables | -| `-i`, `--interactive` | | | Keep STDIN open even if not attached | -| [`--privileged`](#privileged) | | | Give extended privileges to the command | -| `-t`, `--tty` | | | Allocate a pseudo-TTY | +| `-i`, `--interactive` | `bool` | | Keep STDIN open even if not attached | +| [`--privileged`](#privileged) | `bool` | | Give extended privileges to the command | +| `-t`, `--tty` | `bool` | | Allocate a pseudo-TTY | | `-u`, `--user` | `string` | | Username or UID (format: `[:]`) | | [`-w`](#workdir), [`--workdir`](#workdir) | `string` | | Working directory inside the container | diff --git a/docs/reference/commandline/container_inspect.md b/docs/reference/commandline/container_inspect.md index 8ebd2157aede..0ca805ded4a6 100644 --- a/docs/reference/commandline/container_inspect.md +++ b/docs/reference/commandline/container_inspect.md @@ -8,7 +8,7 @@ Display detailed information on one or more containers | Name | Type | Default | Description | |:-----------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `-f`, `--format` | `string` | | Format output using a custom template:
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | -| `-s`, `--size` | | | Display total file sizes | +| `-s`, `--size` | `bool` | | Display total file sizes | diff --git a/docs/reference/commandline/container_logs.md b/docs/reference/commandline/container_logs.md index 9b4d29cdd170..ff8b92de50c2 100644 --- a/docs/reference/commandline/container_logs.md +++ b/docs/reference/commandline/container_logs.md @@ -11,11 +11,11 @@ Fetch the logs of a container | Name | Type | Default | Description | |:---------------------|:---------|:--------|:---------------------------------------------------------------------------------------------------| -| `--details` | | | Show extra details provided to logs | -| `-f`, `--follow` | | | Follow log output | +| `--details` | `bool` | | Show extra details provided to logs | +| `-f`, `--follow` | `bool` | | Follow log output | | `--since` | `string` | | Show logs since timestamp (e.g. `2013-01-02T13:23:37Z`) or relative (e.g. `42m` for 42 minutes) | | `-n`, `--tail` | `string` | `all` | Number of lines to show from the end of the logs | -| `-t`, `--timestamps` | | | Show timestamps | +| `-t`, `--timestamps` | `bool` | | Show timestamps | | [`--until`](#until) | `string` | | Show logs before a timestamp (e.g. `2013-01-02T13:23:37Z`) or relative (e.g. `42m` for 42 minutes) | diff --git a/docs/reference/commandline/container_ls.md b/docs/reference/commandline/container_ls.md index 062fdcb4cd1b..38ee110bc0f5 100644 --- a/docs/reference/commandline/container_ls.md +++ b/docs/reference/commandline/container_ls.md @@ -11,14 +11,14 @@ List containers | Name | Type | Default | Description | |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [`-a`](#all), [`--all`](#all) | | | Show all containers (default shows just running) | +| [`-a`](#all), [`--all`](#all) | `bool` | | Show all containers (default shows just running) | | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided | | [`--format`](#format) | `string` | | Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | `-n`, `--last` | `int` | `-1` | Show n last created containers (includes all states) | -| `-l`, `--latest` | | | Show the latest created container (includes all states) | -| [`--no-trunc`](#no-trunc) | | | Don't truncate output | -| `-q`, `--quiet` | | | Only display container IDs | -| [`-s`](#size), [`--size`](#size) | | | Display total file sizes | +| `-l`, `--latest` | `bool` | | Show the latest created container (includes all states) | +| [`--no-trunc`](#no-trunc) | `bool` | | Don't truncate output | +| `-q`, `--quiet` | `bool` | | Only display container IDs | +| [`-s`](#size), [`--size`](#size) | `bool` | | Display total file sizes | diff --git a/docs/reference/commandline/container_prune.md b/docs/reference/commandline/container_prune.md index 8450625ddcee..08606e97b7b4 100644 --- a/docs/reference/commandline/container_prune.md +++ b/docs/reference/commandline/container_prune.md @@ -8,7 +8,7 @@ Remove all stopped containers | Name | Type | Default | Description | |:----------------------|:---------|:--------|:-------------------------------------------------| | [`--filter`](#filter) | `filter` | | Provide filter values (e.g. `until=`) | -| `-f`, `--force` | | | Do not prompt for confirmation | +| `-f`, `--force` | `bool` | | Do not prompt for confirmation | diff --git a/docs/reference/commandline/container_rm.md b/docs/reference/commandline/container_rm.md index cbb8b81c4558..ee370f71e43b 100644 --- a/docs/reference/commandline/container_rm.md +++ b/docs/reference/commandline/container_rm.md @@ -9,11 +9,11 @@ Remove one or more containers ### Options -| Name | Type | Default | Description | -|:------------------------------------------|:-----|:--------|:--------------------------------------------------------| -| [`-f`](#force), [`--force`](#force) | | | Force the removal of a running container (uses SIGKILL) | -| [`-l`](#link), [`--link`](#link) | | | Remove the specified link | -| [`-v`](#volumes), [`--volumes`](#volumes) | | | Remove anonymous volumes associated with the container | +| Name | Type | Default | Description | +|:------------------------------------------|:-------|:--------|:--------------------------------------------------------| +| [`-f`](#force), [`--force`](#force) | `bool` | | Force the removal of a running container (uses SIGKILL) | +| [`-l`](#link), [`--link`](#link) | `bool` | | Remove the specified link | +| [`-v`](#volumes), [`--volumes`](#volumes) | `bool` | | Remove anonymous volumes associated with the container | diff --git a/docs/reference/commandline/container_run.md b/docs/reference/commandline/container_run.md index 27b4eb42e4df..9d426a3bf1e0 100644 --- a/docs/reference/commandline/container_run.md +++ b/docs/reference/commandline/container_run.md @@ -31,7 +31,7 @@ Create and run a new container from an image | `--cpus` | `decimal` | | Number of CPUs | | `--cpuset-cpus` | `string` | | CPUs in which to allow execution (0-3, 0,1) | | `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) | -| [`-d`](#detach), [`--detach`](#detach) | | | Run container in background and print container ID | +| [`-d`](#detach), [`--detach`](#detach) | `bool` | | Run container in background and print container ID | | [`--detach-keys`](#detach-keys) | `string` | | Override the key sequence for detaching a container | | [`--device`](#device) | `list` | | Add a host device to the container | | [`--device-cgroup-rule`](#device-cgroup-rule) | `list` | | Add a rule to the cgroup allowed devices list | @@ -56,10 +56,10 @@ Create and run a new container from an image | `--health-start-interval` | `duration` | `0s` | Time between running the check during the start period (ms\|s\|m\|h) (default 0s) | | `--health-start-period` | `duration` | `0s` | Start period for the container to initialize before starting health-retries countdown (ms\|s\|m\|h) (default 0s) | | `--health-timeout` | `duration` | `0s` | Maximum time to allow one check to run (ms\|s\|m\|h) (default 0s) | -| `--help` | | | Print usage | +| `--help` | `bool` | | Print usage | | `-h`, `--hostname` | `string` | | Container host name | -| [`--init`](#init) | | | Run an init inside the container that forwards signals and reaps processes | -| [`-i`](#interactive), [`--interactive`](#interactive) | | | Keep STDIN open even if not attached | +| [`--init`](#init) | `bool` | | Run an init inside the container that forwards signals and reaps processes | +| [`-i`](#interactive), [`--interactive`](#interactive) | `bool` | | Keep STDIN open even if not attached | | `--io-maxbandwidth` | `bytes` | `0` | Maximum IO bandwidth limit for the system drive (Windows only) | | `--io-maxiops` | `uint64` | `0` | Maximum IOps limit for the system drive (Windows only) | | `--ip` | `string` | | IPv4 address (e.g., 172.30.100.104) | @@ -82,20 +82,20 @@ Create and run a new container from an image | [`--name`](#name) | `string` | | Assign a name to the container | | [`--network`](#network) | `network` | | Connect a container to a network | | `--network-alias` | `list` | | Add network-scoped alias for the container | -| `--no-healthcheck` | | | Disable any container-specified HEALTHCHECK | -| `--oom-kill-disable` | | | Disable OOM Killer | +| `--no-healthcheck` | `bool` | | Disable any container-specified HEALTHCHECK | +| `--oom-kill-disable` | `bool` | | Disable OOM Killer | | `--oom-score-adj` | `int` | `0` | Tune host's OOM preferences (-1000 to 1000) | | [`--pid`](#pid) | `string` | | PID namespace to use | | `--pids-limit` | `int64` | `0` | Tune container pids limit (set -1 for unlimited) | | `--platform` | `string` | | Set platform if server is multi-platform capable | -| [`--privileged`](#privileged) | | | Give extended privileges to this container | +| [`--privileged`](#privileged) | `bool` | | Give extended privileges to this container | | [`-p`](#publish), [`--publish`](#publish) | `list` | | Publish a container's port(s) to the host | -| [`-P`](#publish-all), [`--publish-all`](#publish-all) | | | Publish all exposed ports to random ports | +| [`-P`](#publish-all), [`--publish-all`](#publish-all) | `bool` | | Publish all exposed ports to random ports | | [`--pull`](#pull) | `string` | `missing` | Pull image before running (`always`, `missing`, `never`) | -| `-q`, `--quiet` | | | Suppress the pull output | -| [`--read-only`](#read-only) | | | Mount the container's root filesystem as read only | +| `-q`, `--quiet` | `bool` | | Suppress the pull output | +| [`--read-only`](#read-only) | `bool` | | Mount the container's root filesystem as read only | | [`--restart`](#restart) | `string` | `no` | Restart policy to apply when a container exits | -| [`--rm`](#rm) | | | Automatically remove the container and its associated anonymous volumes when it exits | +| [`--rm`](#rm) | `bool` | | Automatically remove the container and its associated anonymous volumes when it exits | | `--runtime` | `string` | | Runtime to use for this container | | [`--security-opt`](#security-opt) | `list` | | Security Options | | `--shm-size` | `bytes` | `0` | Size of /dev/shm | @@ -105,7 +105,7 @@ Create and run a new container from an image | [`--storage-opt`](#storage-opt) | `list` | | Storage driver options for the container | | [`--sysctl`](#sysctl) | `map` | `map[]` | Sysctl options | | [`--tmpfs`](#tmpfs) | `list` | | Mount a tmpfs directory | -| [`-t`](#tty), [`--tty`](#tty) | | | Allocate a pseudo-TTY | +| [`-t`](#tty), [`--tty`](#tty) | `bool` | | Allocate a pseudo-TTY | | [`--ulimit`](#ulimit) | `ulimit` | | Ulimit options | | `-u`, `--user` | `string` | | Username or UID (format: [:]) | | [`--userns`](#userns) | `string` | | User namespace to use | diff --git a/docs/reference/commandline/container_start.md b/docs/reference/commandline/container_start.md index 866a24921aee..256fc9c8a830 100644 --- a/docs/reference/commandline/container_start.md +++ b/docs/reference/commandline/container_start.md @@ -11,11 +11,11 @@ Start one or more stopped containers | Name | Type | Default | Description | |:----------------------|:---------|:--------|:----------------------------------------------------| -| `-a`, `--attach` | | | Attach STDOUT/STDERR and forward signals | +| `-a`, `--attach` | `bool` | | Attach STDOUT/STDERR and forward signals | | `--checkpoint` | `string` | | Restore from this checkpoint | | `--checkpoint-dir` | `string` | | Use a custom checkpoint storage directory | | `--detach-keys` | `string` | | Override the key sequence for detaching a container | -| `-i`, `--interactive` | | | Attach container's STDIN | +| `-i`, `--interactive` | `bool` | | Attach container's STDIN | diff --git a/docs/reference/commandline/container_stats.md b/docs/reference/commandline/container_stats.md index f59ea7838a77..4f50560240ec 100644 --- a/docs/reference/commandline/container_stats.md +++ b/docs/reference/commandline/container_stats.md @@ -11,10 +11,10 @@ Display a live stream of container(s) resource usage statistics | Name | Type | Default | Description | |:----------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `-a`, `--all` | | | Show all containers (default shows just running) | +| `-a`, `--all` | `bool` | | Show all containers (default shows just running) | | [`--format`](#format) | `string` | | Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | -| `--no-stream` | | | Disable streaming stats and only pull the first result | -| `--no-trunc` | | | Do not truncate output | +| `--no-stream` | `bool` | | Disable streaming stats and only pull the first result | +| `--no-trunc` | `bool` | | Do not truncate output | diff --git a/docs/reference/commandline/context_ls.md b/docs/reference/commandline/context_ls.md index e7d9b0ea1532..2f062f4a2456 100644 --- a/docs/reference/commandline/context_ls.md +++ b/docs/reference/commandline/context_ls.md @@ -12,7 +12,7 @@ List contexts | Name | Type | Default | Description | |:----------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `--format` | `string` | | Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | -| `-q`, `--quiet` | | | Only show context names | +| `-q`, `--quiet` | `bool` | | Only show context names | diff --git a/docs/reference/commandline/context_rm.md b/docs/reference/commandline/context_rm.md index 933941580a6f..05ed2f1f3859 100644 --- a/docs/reference/commandline/context_rm.md +++ b/docs/reference/commandline/context_rm.md @@ -9,9 +9,9 @@ Remove one or more contexts ### Options -| Name | Type | Default | Description | -|:----------------|:-----|:--------|:--------------------------------------| -| `-f`, `--force` | | | Force the removal of a context in use | +| Name | Type | Default | Description | +|:----------------|:-------|:--------|:--------------------------------------| +| `-f`, `--force` | `bool` | | Force the removal of a context in use | diff --git a/docs/reference/commandline/cp.md b/docs/reference/commandline/cp.md index 41c9529f9f0a..ded96d696643 100644 --- a/docs/reference/commandline/cp.md +++ b/docs/reference/commandline/cp.md @@ -14,11 +14,11 @@ container source to stdout. ### Options -| Name | Type | Default | Description | -|:----------------------|:-----|:--------|:-------------------------------------------------------------------------------------------------------------| -| `-a`, `--archive` | | | Archive mode (copy all uid/gid information) | -| `-L`, `--follow-link` | | | Always follow symbol link in SRC_PATH | -| `-q`, `--quiet` | | | Suppress progress output during copy. Progress output is automatically suppressed if no terminal is attached | +| Name | Type | Default | Description | +|:----------------------|:-------|:--------|:-------------------------------------------------------------------------------------------------------------| +| `-a`, `--archive` | `bool` | | Archive mode (copy all uid/gid information) | +| `-L`, `--follow-link` | `bool` | | Always follow symbol link in SRC_PATH | +| `-q`, `--quiet` | `bool` | | Suppress progress output during copy. Progress output is automatically suppressed if no terminal is attached | diff --git a/docs/reference/commandline/create.md b/docs/reference/commandline/create.md index f0964921c5e8..59488a5404af 100644 --- a/docs/reference/commandline/create.md +++ b/docs/reference/commandline/create.md @@ -54,10 +54,10 @@ Create a new container | `--health-start-interval` | `duration` | `0s` | Time between running the check during the start period (ms\|s\|m\|h) (default 0s) | | `--health-start-period` | `duration` | `0s` | Start period for the container to initialize before starting health-retries countdown (ms\|s\|m\|h) (default 0s) | | `--health-timeout` | `duration` | `0s` | Maximum time to allow one check to run (ms\|s\|m\|h) (default 0s) | -| `--help` | | | Print usage | +| `--help` | `bool` | | Print usage | | `-h`, `--hostname` | `string` | | Container host name | -| `--init` | | | Run an init inside the container that forwards signals and reaps processes | -| `-i`, `--interactive` | | | Keep STDIN open even if not attached | +| `--init` | `bool` | | Run an init inside the container that forwards signals and reaps processes | +| `-i`, `--interactive` | `bool` | | Keep STDIN open even if not attached | | `--io-maxbandwidth` | `bytes` | `0` | Maximum IO bandwidth limit for the system drive (Windows only) | | `--io-maxiops` | `uint64` | `0` | Maximum IOps limit for the system drive (Windows only) | | `--ip` | `string` | | IPv4 address (e.g., 172.30.100.104) | @@ -80,20 +80,20 @@ Create a new container | `--name` | `string` | | Assign a name to the container | | `--network` | `network` | | Connect a container to a network | | `--network-alias` | `list` | | Add network-scoped alias for the container | -| `--no-healthcheck` | | | Disable any container-specified HEALTHCHECK | -| `--oom-kill-disable` | | | Disable OOM Killer | +| `--no-healthcheck` | `bool` | | Disable any container-specified HEALTHCHECK | +| `--oom-kill-disable` | `bool` | | Disable OOM Killer | | `--oom-score-adj` | `int` | `0` | Tune host's OOM preferences (-1000 to 1000) | | `--pid` | `string` | | PID namespace to use | | `--pids-limit` | `int64` | `0` | Tune container pids limit (set -1 for unlimited) | | `--platform` | `string` | | Set platform if server is multi-platform capable | -| `--privileged` | | | Give extended privileges to this container | +| `--privileged` | `bool` | | Give extended privileges to this container | | `-p`, `--publish` | `list` | | Publish a container's port(s) to the host | -| `-P`, `--publish-all` | | | Publish all exposed ports to random ports | +| `-P`, `--publish-all` | `bool` | | Publish all exposed ports to random ports | | `--pull` | `string` | `missing` | Pull image before creating (`always`, `\|missing`, `never`) | -| `-q`, `--quiet` | | | Suppress the pull output | -| `--read-only` | | | Mount the container's root filesystem as read only | +| `-q`, `--quiet` | `bool` | | Suppress the pull output | +| `--read-only` | `bool` | | Mount the container's root filesystem as read only | | `--restart` | `string` | `no` | Restart policy to apply when a container exits | -| `--rm` | | | Automatically remove the container and its associated anonymous volumes when it exits | +| `--rm` | `bool` | | Automatically remove the container and its associated anonymous volumes when it exits | | `--runtime` | `string` | | Runtime to use for this container | | `--security-opt` | `list` | | Security Options | | `--shm-size` | `bytes` | `0` | Size of /dev/shm | @@ -102,7 +102,7 @@ Create a new container | `--storage-opt` | `list` | | Storage driver options for the container | | `--sysctl` | `map` | `map[]` | Sysctl options | | `--tmpfs` | `list` | | Mount a tmpfs directory | -| `-t`, `--tty` | | | Allocate a pseudo-TTY | +| `-t`, `--tty` | `bool` | | Allocate a pseudo-TTY | | `--ulimit` | `ulimit` | | Ulimit options | | `-u`, `--user` | `string` | | Username or UID (format: [:]) | | `--userns` | `string` | | User namespace to use | diff --git a/docs/reference/commandline/docker.md b/docs/reference/commandline/docker.md index 3bfdffb1804d..bfca795855ae 100644 --- a/docs/reference/commandline/docker.md +++ b/docs/reference/commandline/docker.md @@ -72,14 +72,14 @@ The base command for the Docker CLI. |:---------------------------------|:---------|:-------------------------|:--------------------------------------------------------------------------------------------------------------------------------------| | `--config` | `string` | `/root/.docker` | Location of client config files | | `-c`, `--context` | `string` | | Name of the context to use to connect to the daemon (overrides DOCKER_HOST env var and default context set with `docker context use`) | -| `-D`, `--debug` | | | Enable debug mode | +| `-D`, `--debug` | `bool` | | Enable debug mode | | [`-H`](#host), [`--host`](#host) | `list` | | Daemon socket to connect to | | `-l`, `--log-level` | `string` | `info` | Set the logging level (`debug`, `info`, `warn`, `error`, `fatal`) | -| `--tls` | | | Use TLS; implied by --tlsverify | +| `--tls` | `bool` | | Use TLS; implied by --tlsverify | | `--tlscacert` | `string` | `/root/.docker/ca.pem` | Trust certs signed only by this CA | | `--tlscert` | `string` | `/root/.docker/cert.pem` | Path to TLS certificate file | | `--tlskey` | `string` | `/root/.docker/key.pem` | Path to TLS key file | -| `--tlsverify` | | | Use TLS and verify the remote | +| `--tlsverify` | `bool` | | Use TLS and verify the remote | diff --git a/docs/reference/commandline/exec.md b/docs/reference/commandline/exec.md index 67bf20a1376f..b2be3e495825 100644 --- a/docs/reference/commandline/exec.md +++ b/docs/reference/commandline/exec.md @@ -11,13 +11,13 @@ Execute a command in a running container | Name | Type | Default | Description | |:----------------------|:---------|:--------|:-------------------------------------------------------| -| `-d`, `--detach` | | | Detached mode: run command in the background | +| `-d`, `--detach` | `bool` | | Detached mode: run command in the background | | `--detach-keys` | `string` | | Override the key sequence for detaching a container | | `-e`, `--env` | `list` | | Set environment variables | | `--env-file` | `list` | | Read in a file of environment variables | -| `-i`, `--interactive` | | | Keep STDIN open even if not attached | -| `--privileged` | | | Give extended privileges to the command | -| `-t`, `--tty` | | | Allocate a pseudo-TTY | +| `-i`, `--interactive` | `bool` | | Keep STDIN open even if not attached | +| `--privileged` | `bool` | | Give extended privileges to the command | +| `-t`, `--tty` | `bool` | | Allocate a pseudo-TTY | | `-u`, `--user` | `string` | | Username or UID (format: `[:]`) | | `-w`, `--workdir` | `string` | | Working directory inside the container | diff --git a/docs/reference/commandline/history.md b/docs/reference/commandline/history.md index 15a02e9092b5..7705c70bcac8 100644 --- a/docs/reference/commandline/history.md +++ b/docs/reference/commandline/history.md @@ -13,8 +13,8 @@ Show the history of an image |:----------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `--format` | `string` | | Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | `-H`, `--human` | `bool` | `true` | Print sizes and dates in human readable format | -| `--no-trunc` | | | Don't truncate output | -| `-q`, `--quiet` | | | Only show image IDs | +| `--no-trunc` | `bool` | | Don't truncate output | +| `-q`, `--quiet` | `bool` | | Only show image IDs | diff --git a/docs/reference/commandline/image_build.md b/docs/reference/commandline/image_build.md index a971d12967c7..49690b714d29 100644 --- a/docs/reference/commandline/image_build.md +++ b/docs/reference/commandline/image_build.md @@ -15,7 +15,7 @@ Build an image from a Dockerfile | [`--build-arg`](https://docs.docker.com/reference/cli/docker/buildx/build/#build-arg) | `list` | | Set build-time variables | | `--cache-from` | `stringSlice` | | Images to consider as cache sources | | [`--cgroup-parent`](https://docs.docker.com/reference/cli/docker/buildx/build/#cgroup-parent) | `string` | | Set the parent cgroup for the `RUN` instructions during build | -| `--compress` | | | Compress the build context using gzip | +| `--compress` | `bool` | | Compress the build context using gzip | | `--cpu-period` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) period | | `--cpu-quota` | `int64` | `0` | Limit the CPU CFS (Completely Fair Scheduler) quota | | `-c`, `--cpu-shares` | `int64` | `0` | CPU shares (relative weight) | @@ -23,21 +23,21 @@ Build an image from a Dockerfile | `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) | | `--disable-content-trust` | `bool` | `true` | Skip image verification | | [`-f`](https://docs.docker.com/reference/cli/docker/buildx/build/#file), [`--file`](https://docs.docker.com/reference/cli/docker/buildx/build/#file) | `string` | | Name of the Dockerfile (Default is `PATH/Dockerfile`) | -| `--force-rm` | | | Always remove intermediate containers | +| `--force-rm` | `bool` | | Always remove intermediate containers | | `--iidfile` | `string` | | Write the image ID to the file | | [`--isolation`](#isolation) | `string` | | Container isolation technology | | `--label` | `list` | | Set metadata for an image | | `-m`, `--memory` | `bytes` | `0` | Memory limit | | `--memory-swap` | `bytes` | `0` | Swap limit equal to memory plus swap: -1 to enable unlimited swap | | [`--network`](https://docs.docker.com/reference/cli/docker/buildx/build/#network) | `string` | `default` | Set the networking mode for the RUN instructions during build | -| `--no-cache` | | | Do not use cache when building the image | +| `--no-cache` | `bool` | | Do not use cache when building the image | | `--platform` | `string` | | Set platform if server is multi-platform capable | -| `--pull` | | | Always attempt to pull a newer version of the image | -| `-q`, `--quiet` | | | Suppress the build output and print image ID on success | +| `--pull` | `bool` | | Always attempt to pull a newer version of the image | +| `-q`, `--quiet` | `bool` | | Suppress the build output and print image ID on success | | `--rm` | `bool` | `true` | Remove intermediate containers after a successful build | | [`--security-opt`](#security-opt) | `stringSlice` | | Security options | | `--shm-size` | `bytes` | `0` | Size of `/dev/shm` | -| [`--squash`](#squash) | | | Squash newly built layers into a single new layer | +| [`--squash`](#squash) | `bool` | | Squash newly built layers into a single new layer | | [`-t`](https://docs.docker.com/reference/cli/docker/buildx/build/#tag), [`--tag`](https://docs.docker.com/reference/cli/docker/buildx/build/#tag) | `list` | | Name and optionally a tag in the `name:tag` format | | [`--target`](https://docs.docker.com/reference/cli/docker/buildx/build/#target) | `string` | | Set the target build stage to build. | | `--ulimit` | `ulimit` | | Ulimit options | diff --git a/docs/reference/commandline/image_history.md b/docs/reference/commandline/image_history.md index 5b8ad00600e1..7ed258a9f5be 100644 --- a/docs/reference/commandline/image_history.md +++ b/docs/reference/commandline/image_history.md @@ -13,8 +13,8 @@ Show the history of an image |:----------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`--format`](#format) | `string` | | Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | `-H`, `--human` | `bool` | `true` | Print sizes and dates in human readable format | -| `--no-trunc` | | | Don't truncate output | -| `-q`, `--quiet` | | | Only show image IDs | +| `--no-trunc` | `bool` | | Don't truncate output | +| `-q`, `--quiet` | `bool` | | Only show image IDs | diff --git a/docs/reference/commandline/image_load.md b/docs/reference/commandline/image_load.md index 098af0a24335..8b675a3bb1ab 100644 --- a/docs/reference/commandline/image_load.md +++ b/docs/reference/commandline/image_load.md @@ -12,7 +12,7 @@ Load an image from a tar archive or STDIN | Name | Type | Default | Description | |:------------------------------------|:---------|:--------|:---------------------------------------------| | [`-i`](#input), [`--input`](#input) | `string` | | Read from tar archive file, instead of STDIN | -| `-q`, `--quiet` | | | Suppress the load output | +| `-q`, `--quiet` | `bool` | | Suppress the load output | diff --git a/docs/reference/commandline/image_ls.md b/docs/reference/commandline/image_ls.md index 1467c37c6eca..3365c29c6b45 100644 --- a/docs/reference/commandline/image_ls.md +++ b/docs/reference/commandline/image_ls.md @@ -11,12 +11,12 @@ List images | Name | Type | Default | Description | |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `-a`, `--all` | | | Show all images (default hides intermediate images) | -| [`--digests`](#digests) | | | Show digests | +| `-a`, `--all` | `bool` | | Show all images (default hides intermediate images) | +| [`--digests`](#digests) | `bool` | | Show digests | | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided | | [`--format`](#format) | `string` | | Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | -| [`--no-trunc`](#no-trunc) | | | Don't truncate output | -| `-q`, `--quiet` | | | Only show image IDs | +| [`--no-trunc`](#no-trunc) | `bool` | | Don't truncate output | +| `-q`, `--quiet` | `bool` | | Only show image IDs | diff --git a/docs/reference/commandline/image_prune.md b/docs/reference/commandline/image_prune.md index 23235dbc18b2..9edd2af0ff4b 100644 --- a/docs/reference/commandline/image_prune.md +++ b/docs/reference/commandline/image_prune.md @@ -7,9 +7,9 @@ Remove unused images | Name | Type | Default | Description | |:----------------------|:---------|:--------|:-------------------------------------------------| -| `-a`, `--all` | | | Remove all unused images, not just dangling ones | +| `-a`, `--all` | `bool` | | Remove all unused images, not just dangling ones | | [`--filter`](#filter) | `filter` | | Provide filter values (e.g. `until=`) | -| `-f`, `--force` | | | Do not prompt for confirmation | +| `-f`, `--force` | `bool` | | Do not prompt for confirmation | diff --git a/docs/reference/commandline/image_pull.md b/docs/reference/commandline/image_pull.md index 8333dd3e8196..5cc19fa384b1 100644 --- a/docs/reference/commandline/image_pull.md +++ b/docs/reference/commandline/image_pull.md @@ -11,10 +11,10 @@ Download an image from a registry | Name | Type | Default | Description | |:---------------------------------------------|:---------|:--------|:-------------------------------------------------| -| [`-a`](#all-tags), [`--all-tags`](#all-tags) | | | Download all tagged images in the repository | +| [`-a`](#all-tags), [`--all-tags`](#all-tags) | `bool` | | Download all tagged images in the repository | | `--disable-content-trust` | `bool` | `true` | Skip image verification | | `--platform` | `string` | | Set platform if server is multi-platform capable | -| `-q`, `--quiet` | | | Suppress verbose output | +| `-q`, `--quiet` | `bool` | | Suppress verbose output | diff --git a/docs/reference/commandline/image_push.md b/docs/reference/commandline/image_push.md index 592d2c3bc71e..d58282a1accc 100644 --- a/docs/reference/commandline/image_push.md +++ b/docs/reference/commandline/image_push.md @@ -11,10 +11,10 @@ Upload an image to a registry | Name | Type | Default | Description | |:---------------------------------------------|:---------|:--------|:--------------------------------------------------------------------------------------------------------------------------------------------| -| [`-a`](#all-tags), [`--all-tags`](#all-tags) | | | Push all tags of an image to the repository | +| [`-a`](#all-tags), [`--all-tags`](#all-tags) | `bool` | | Push all tags of an image to the repository | | `--disable-content-trust` | `bool` | `true` | Skip image signing | | `--platform` | `string` | | Push a platform-specific manifest as a single-platform image to the registry.
'os[/arch[/variant]]': Explicit platform (eg. linux/amd64) | -| `-q`, `--quiet` | | | Suppress verbose output | +| `-q`, `--quiet` | `bool` | | Suppress verbose output | diff --git a/docs/reference/commandline/image_rm.md b/docs/reference/commandline/image_rm.md index f3b303da0b69..81ff55c6b0c4 100644 --- a/docs/reference/commandline/image_rm.md +++ b/docs/reference/commandline/image_rm.md @@ -9,10 +9,10 @@ Remove one or more images ### Options -| Name | Type | Default | Description | -|:----------------|:-----|:--------|:-------------------------------| -| `-f`, `--force` | | | Force removal of the image | -| `--no-prune` | | | Do not delete untagged parents | +| Name | Type | Default | Description | +|:----------------|:-------|:--------|:-------------------------------| +| `-f`, `--force` | `bool` | | Force removal of the image | +| `--no-prune` | `bool` | | Do not delete untagged parents | diff --git a/docs/reference/commandline/images.md b/docs/reference/commandline/images.md index 1fa9f6a319c5..1f7b3b5a4da0 100644 --- a/docs/reference/commandline/images.md +++ b/docs/reference/commandline/images.md @@ -11,12 +11,12 @@ List images | Name | Type | Default | Description | |:-----------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `-a`, `--all` | | | Show all images (default hides intermediate images) | -| `--digests` | | | Show digests | +| `-a`, `--all` | `bool` | | Show all images (default hides intermediate images) | +| `--digests` | `bool` | | Show digests | | `-f`, `--filter` | `filter` | | Filter output based on conditions provided | | `--format` | `string` | | Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | -| `--no-trunc` | | | Don't truncate output | -| `-q`, `--quiet` | | | Only show image IDs | +| `--no-trunc` | `bool` | | Don't truncate output | +| `-q`, `--quiet` | `bool` | | Only show image IDs | diff --git a/docs/reference/commandline/inspect.md b/docs/reference/commandline/inspect.md index 04a9f6d3b71b..174c440e6c5f 100644 --- a/docs/reference/commandline/inspect.md +++ b/docs/reference/commandline/inspect.md @@ -8,7 +8,7 @@ Return low-level information on Docker objects | Name | Type | Default | Description | |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`-f`](#format), [`--format`](#format) | `string` | | Format output using a custom template:
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | -| [`-s`](#size), [`--size`](#size) | | | Display total file sizes if the type is container | +| [`-s`](#size), [`--size`](#size) | `bool` | | Display total file sizes if the type is container | | [`--type`](#type) | `string` | | Return JSON for specified type | diff --git a/docs/reference/commandline/load.md b/docs/reference/commandline/load.md index 778d263077dd..c961f06020df 100644 --- a/docs/reference/commandline/load.md +++ b/docs/reference/commandline/load.md @@ -12,7 +12,7 @@ Load an image from a tar archive or STDIN | Name | Type | Default | Description | |:----------------|:---------|:--------|:---------------------------------------------| | `-i`, `--input` | `string` | | Read from tar archive file, instead of STDIN | -| `-q`, `--quiet` | | | Suppress the load output | +| `-q`, `--quiet` | `bool` | | Suppress the load output | diff --git a/docs/reference/commandline/login.md b/docs/reference/commandline/login.md index 6e41586a19f4..f61043a1dd82 100644 --- a/docs/reference/commandline/login.md +++ b/docs/reference/commandline/login.md @@ -9,7 +9,7 @@ If no server is specified, the default is defined by the daemon. | Name | Type | Default | Description | |:--------------------------------------|:---------|:--------|:-----------------------------| | `-p`, `--password` | `string` | | Password | -| [`--password-stdin`](#password-stdin) | | | Take the password from stdin | +| [`--password-stdin`](#password-stdin) | `bool` | | Take the password from stdin | | `-u`, `--username` | `string` | | Username | diff --git a/docs/reference/commandline/logs.md b/docs/reference/commandline/logs.md index 840f0562a5c6..56e7671c5c2a 100644 --- a/docs/reference/commandline/logs.md +++ b/docs/reference/commandline/logs.md @@ -11,11 +11,11 @@ Fetch the logs of a container | Name | Type | Default | Description | |:---------------------|:---------|:--------|:---------------------------------------------------------------------------------------------------| -| `--details` | | | Show extra details provided to logs | -| `-f`, `--follow` | | | Follow log output | +| `--details` | `bool` | | Show extra details provided to logs | +| `-f`, `--follow` | `bool` | | Follow log output | | `--since` | `string` | | Show logs since timestamp (e.g. `2013-01-02T13:23:37Z`) or relative (e.g. `42m` for 42 minutes) | | `-n`, `--tail` | `string` | `all` | Number of lines to show from the end of the logs | -| `-t`, `--timestamps` | | | Show timestamps | +| `-t`, `--timestamps` | `bool` | | Show timestamps | | `--until` | `string` | | Show logs before a timestamp (e.g. `2013-01-02T13:23:37Z`) or relative (e.g. `42m` for 42 minutes) | diff --git a/docs/reference/commandline/manifest_create.md b/docs/reference/commandline/manifest_create.md index 2879fae6f798..1686ed53e951 100644 --- a/docs/reference/commandline/manifest_create.md +++ b/docs/reference/commandline/manifest_create.md @@ -5,10 +5,10 @@ Create a local manifest list for annotating and pushing to a registry ### Options -| Name | Type | Default | Description | -|:----------------|:-----|:--------|:----------------------------------------------| -| `-a`, `--amend` | | | Amend an existing manifest list | -| `--insecure` | | | Allow communication with an insecure registry | +| Name | Type | Default | Description | +|:----------------|:-------|:--------|:----------------------------------------------| +| `-a`, `--amend` | `bool` | | Amend an existing manifest list | +| `--insecure` | `bool` | | Allow communication with an insecure registry | diff --git a/docs/reference/commandline/manifest_inspect.md b/docs/reference/commandline/manifest_inspect.md index 79c062193cab..cc2da1a8df59 100644 --- a/docs/reference/commandline/manifest_inspect.md +++ b/docs/reference/commandline/manifest_inspect.md @@ -5,10 +5,10 @@ Display an image manifest, or manifest list ### Options -| Name | Type | Default | Description | -|:------------------|:-----|:--------|:-----------------------------------------------------| -| `--insecure` | | | Allow communication with an insecure registry | -| `-v`, `--verbose` | | | Output additional info including layers and platform | +| Name | Type | Default | Description | +|:------------------|:-------|:--------|:-----------------------------------------------------| +| `--insecure` | `bool` | | Allow communication with an insecure registry | +| `-v`, `--verbose` | `bool` | | Output additional info including layers and platform | diff --git a/docs/reference/commandline/manifest_push.md b/docs/reference/commandline/manifest_push.md index 67a7d18a4f1c..34958bd21a2b 100644 --- a/docs/reference/commandline/manifest_push.md +++ b/docs/reference/commandline/manifest_push.md @@ -5,10 +5,10 @@ Push a manifest list to a repository ### Options -| Name | Type | Default | Description | -|:----------------|:-----|:--------|:------------------------------------------| -| `--insecure` | | | Allow push to an insecure registry | -| `-p`, `--purge` | | | Remove the local manifest list after push | +| Name | Type | Default | Description | +|:----------------|:-------|:--------|:------------------------------------------| +| `--insecure` | `bool` | | Allow push to an insecure registry | +| `-p`, `--purge` | `bool` | | Remove the local manifest list after push | diff --git a/docs/reference/commandline/network_create.md b/docs/reference/commandline/network_create.md index 585bc373acdc..43c59ba3d07f 100644 --- a/docs/reference/commandline/network_create.md +++ b/docs/reference/commandline/network_create.md @@ -7,18 +7,18 @@ Create a network | Name | Type | Default | Description | |:--------------------------|:--------------|:----------|:--------------------------------------------------------| -| `--attachable` | | | Enable manual container attachment | +| `--attachable` | `bool` | | Enable manual container attachment | | `--aux-address` | `map` | `map[]` | Auxiliary IPv4 or IPv6 addresses used by Network driver | | `--config-from` | `string` | | The network from which to copy the configuration | -| `--config-only` | | | Create a configuration only network | +| `--config-only` | `bool` | | Create a configuration only network | | `-d`, `--driver` | `string` | `bridge` | Driver to manage the Network | | `--gateway` | `stringSlice` | | IPv4 or IPv6 Gateway for the master subnet | -| [`--ingress`](#ingress) | | | Create swarm routing-mesh network | -| [`--internal`](#internal) | | | Restrict external access to the network | +| [`--ingress`](#ingress) | `bool` | | Create swarm routing-mesh network | +| [`--internal`](#internal) | `bool` | | Restrict external access to the network | | `--ip-range` | `stringSlice` | | Allocate container ip from a sub-range | | `--ipam-driver` | `string` | `default` | IP Address Management Driver | | `--ipam-opt` | `map` | `map[]` | Set IPAM driver specific options | -| `--ipv6` | | | Enable or disable IPv6 networking | +| `--ipv6` | `bool` | | Enable or disable IPv6 networking | | `--label` | `list` | | Set metadata on a network | | `-o`, `--opt` | `map` | `map[]` | Set driver specific options | | `--scope` | `string` | | Control the network's scope | diff --git a/docs/reference/commandline/network_disconnect.md b/docs/reference/commandline/network_disconnect.md index 8ab6b9703531..b09a8faeb65d 100644 --- a/docs/reference/commandline/network_disconnect.md +++ b/docs/reference/commandline/network_disconnect.md @@ -5,9 +5,9 @@ Disconnect a container from a network ### Options -| Name | Type | Default | Description | -|:----------------|:-----|:--------|:-------------------------------------------------| -| `-f`, `--force` | | | Force the container to disconnect from a network | +| Name | Type | Default | Description | +|:----------------|:-------|:--------|:-------------------------------------------------| +| `-f`, `--force` | `bool` | | Force the container to disconnect from a network | diff --git a/docs/reference/commandline/network_inspect.md b/docs/reference/commandline/network_inspect.md index 5025d964d967..1c5dec508150 100644 --- a/docs/reference/commandline/network_inspect.md +++ b/docs/reference/commandline/network_inspect.md @@ -8,7 +8,7 @@ Display detailed information on one or more networks | Name | Type | Default | Description | |:------------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `-f`, `--format` | `string` | | Format output using a custom template:
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | -| [`-v`](#verbose), [`--verbose`](#verbose) | | | Verbose output for diagnostics | +| [`-v`](#verbose), [`--verbose`](#verbose) | `bool` | | Verbose output for diagnostics | diff --git a/docs/reference/commandline/network_ls.md b/docs/reference/commandline/network_ls.md index bce120c2ae4a..31e1501ac6bc 100644 --- a/docs/reference/commandline/network_ls.md +++ b/docs/reference/commandline/network_ls.md @@ -13,8 +13,8 @@ List networks |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Provide filter values (e.g. `driver=bridge`) | | [`--format`](#format) | `string` | | Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | -| `--no-trunc` | | | Do not truncate the output | -| `-q`, `--quiet` | | | Only display network IDs | +| `--no-trunc` | `bool` | | Do not truncate the output | +| `-q`, `--quiet` | `bool` | | Only display network IDs | diff --git a/docs/reference/commandline/network_prune.md b/docs/reference/commandline/network_prune.md index 9a0ee1d247cc..9cbd79522cff 100644 --- a/docs/reference/commandline/network_prune.md +++ b/docs/reference/commandline/network_prune.md @@ -8,7 +8,7 @@ Remove all unused networks | Name | Type | Default | Description | |:----------------------|:---------|:--------|:-------------------------------------------------| | [`--filter`](#filter) | `filter` | | Provide filter values (e.g. `until=`) | -| `-f`, `--force` | | | Do not prompt for confirmation | +| `-f`, `--force` | `bool` | | Do not prompt for confirmation | diff --git a/docs/reference/commandline/network_rm.md b/docs/reference/commandline/network_rm.md index 755d2126fdac..0bbe2e4638fd 100644 --- a/docs/reference/commandline/network_rm.md +++ b/docs/reference/commandline/network_rm.md @@ -9,9 +9,9 @@ Remove one or more networks ### Options -| Name | Type | Default | Description | -|:----------------|:-----|:--------|:-------------------------------------------| -| `-f`, `--force` | | | Do not error if the network does not exist | +| Name | Type | Default | Description | +|:----------------|:-------|:--------|:-------------------------------------------| +| `-f`, `--force` | `bool` | | Do not error if the network does not exist | diff --git a/docs/reference/commandline/node_inspect.md b/docs/reference/commandline/node_inspect.md index cc99d4f74084..da1c4033b007 100644 --- a/docs/reference/commandline/node_inspect.md +++ b/docs/reference/commandline/node_inspect.md @@ -8,7 +8,7 @@ Display detailed information on one or more nodes | Name | Type | Default | Description | |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`-f`](#format), [`--format`](#format) | `string` | | Format output using a custom template:
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | -| `--pretty` | | | Print the information in a human friendly format | +| `--pretty` | `bool` | | Print the information in a human friendly format | diff --git a/docs/reference/commandline/node_ls.md b/docs/reference/commandline/node_ls.md index 823e85994f33..3c48b9a9f7a1 100644 --- a/docs/reference/commandline/node_ls.md +++ b/docs/reference/commandline/node_ls.md @@ -13,7 +13,7 @@ List nodes in the swarm |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided | | [`--format`](#format) | `string` | | Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | -| `-q`, `--quiet` | | | Only display IDs | +| `-q`, `--quiet` | `bool` | | Only display IDs | diff --git a/docs/reference/commandline/node_ps.md b/docs/reference/commandline/node_ps.md index dc79db74236c..d3c7e6b80e04 100644 --- a/docs/reference/commandline/node_ps.md +++ b/docs/reference/commandline/node_ps.md @@ -9,9 +9,9 @@ List tasks running on one or more nodes, defaults to current node |:---------------------------------------|:---------|:--------|:-------------------------------------------| | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided | | [`--format`](#format) | `string` | | Pretty-print tasks using a Go template | -| `--no-resolve` | | | Do not map IDs to Names | -| `--no-trunc` | | | Do not truncate output | -| `-q`, `--quiet` | | | Only display task IDs | +| `--no-resolve` | `bool` | | Do not map IDs to Names | +| `--no-trunc` | `bool` | | Do not truncate output | +| `-q`, `--quiet` | `bool` | | Only display task IDs | diff --git a/docs/reference/commandline/node_rm.md b/docs/reference/commandline/node_rm.md index 200adfe38577..812c76515e60 100644 --- a/docs/reference/commandline/node_rm.md +++ b/docs/reference/commandline/node_rm.md @@ -9,9 +9,9 @@ Remove one or more nodes from the swarm ### Options -| Name | Type | Default | Description | -|:------------------------------------|:-----|:--------|:-----------------------------------| -| [`-f`](#force), [`--force`](#force) | | | Force remove a node from the swarm | +| Name | Type | Default | Description | +|:------------------------------------|:-------|:--------|:-----------------------------------| +| [`-f`](#force), [`--force`](#force) | `bool` | | Force remove a node from the swarm | diff --git a/docs/reference/commandline/plugin_create.md b/docs/reference/commandline/plugin_create.md index ff1023406ea1..f68f7cfc3e84 100644 --- a/docs/reference/commandline/plugin_create.md +++ b/docs/reference/commandline/plugin_create.md @@ -5,9 +5,9 @@ Create a plugin from a rootfs and configuration. Plugin data directory must cont ### Options -| Name | Type | Default | Description | -|:-------------|:-----|:--------|:--------------------------------| -| `--compress` | | | Compress the context using gzip | +| Name | Type | Default | Description | +|:-------------|:-------|:--------|:--------------------------------| +| `--compress` | `bool` | | Compress the context using gzip | diff --git a/docs/reference/commandline/plugin_disable.md b/docs/reference/commandline/plugin_disable.md index ec1791155db3..42af48446c11 100644 --- a/docs/reference/commandline/plugin_disable.md +++ b/docs/reference/commandline/plugin_disable.md @@ -5,9 +5,9 @@ Disable a plugin ### Options -| Name | Type | Default | Description | -|:----------------|:-----|:--------|:--------------------------------------| -| `-f`, `--force` | | | Force the disable of an active plugin | +| Name | Type | Default | Description | +|:----------------|:-------|:--------|:--------------------------------------| +| `-f`, `--force` | `bool` | | Force the disable of an active plugin | diff --git a/docs/reference/commandline/plugin_install.md b/docs/reference/commandline/plugin_install.md index 22c3bf2c7cb0..25ceb35c217e 100644 --- a/docs/reference/commandline/plugin_install.md +++ b/docs/reference/commandline/plugin_install.md @@ -8,9 +8,9 @@ Install a plugin | Name | Type | Default | Description | |:--------------------------|:---------|:--------|:--------------------------------------------------| | `--alias` | `string` | | Local name for plugin | -| `--disable` | | | Do not enable the plugin on install | +| `--disable` | `bool` | | Do not enable the plugin on install | | `--disable-content-trust` | `bool` | `true` | Skip image verification | -| `--grant-all-permissions` | | | Grant all permissions necessary to run the plugin | +| `--grant-all-permissions` | `bool` | | Grant all permissions necessary to run the plugin | diff --git a/docs/reference/commandline/plugin_ls.md b/docs/reference/commandline/plugin_ls.md index 894b926fc67c..036aad76c505 100644 --- a/docs/reference/commandline/plugin_ls.md +++ b/docs/reference/commandline/plugin_ls.md @@ -13,8 +13,8 @@ List plugins |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Provide filter values (e.g. `enabled=true`) | | [`--format`](#format) | `string` | | Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | -| `--no-trunc` | | | Don't truncate output | -| `-q`, `--quiet` | | | Only display plugin IDs | +| `--no-trunc` | `bool` | | Don't truncate output | +| `-q`, `--quiet` | `bool` | | Only display plugin IDs | diff --git a/docs/reference/commandline/plugin_rm.md b/docs/reference/commandline/plugin_rm.md index 1dcd149a3dd9..23ad32f431fd 100644 --- a/docs/reference/commandline/plugin_rm.md +++ b/docs/reference/commandline/plugin_rm.md @@ -9,9 +9,9 @@ Remove one or more plugins ### Options -| Name | Type | Default | Description | -|:----------------|:-----|:--------|:--------------------------------------| -| `-f`, `--force` | | | Force the removal of an active plugin | +| Name | Type | Default | Description | +|:----------------|:-------|:--------|:--------------------------------------| +| `-f`, `--force` | `bool` | | Force the removal of an active plugin | diff --git a/docs/reference/commandline/plugin_upgrade.md b/docs/reference/commandline/plugin_upgrade.md index c0147c86fdf4..39730104d4b7 100644 --- a/docs/reference/commandline/plugin_upgrade.md +++ b/docs/reference/commandline/plugin_upgrade.md @@ -8,8 +8,8 @@ Upgrade an existing plugin | Name | Type | Default | Description | |:--------------------------|:-------|:--------|:----------------------------------------------------------------------| | `--disable-content-trust` | `bool` | `true` | Skip image verification | -| `--grant-all-permissions` | | | Grant all permissions necessary to run the plugin | -| `--skip-remote-check` | | | Do not check if specified remote plugin matches existing plugin image | +| `--grant-all-permissions` | `bool` | | Grant all permissions necessary to run the plugin | +| `--skip-remote-check` | `bool` | | Do not check if specified remote plugin matches existing plugin image | diff --git a/docs/reference/commandline/ps.md b/docs/reference/commandline/ps.md index 57fcc6199ab2..5d1cf16fcf6e 100644 --- a/docs/reference/commandline/ps.md +++ b/docs/reference/commandline/ps.md @@ -11,14 +11,14 @@ List containers | Name | Type | Default | Description | |:-----------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `-a`, `--all` | | | Show all containers (default shows just running) | +| `-a`, `--all` | `bool` | | Show all containers (default shows just running) | | `-f`, `--filter` | `filter` | | Filter output based on conditions provided | | `--format` | `string` | | Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | | `-n`, `--last` | `int` | `-1` | Show n last created containers (includes all states) | -| `-l`, `--latest` | | | Show the latest created container (includes all states) | -| `--no-trunc` | | | Don't truncate output | -| `-q`, `--quiet` | | | Only display container IDs | -| `-s`, `--size` | | | Display total file sizes | +| `-l`, `--latest` | `bool` | | Show the latest created container (includes all states) | +| `--no-trunc` | `bool` | | Don't truncate output | +| `-q`, `--quiet` | `bool` | | Only display container IDs | +| `-s`, `--size` | `bool` | | Display total file sizes | diff --git a/docs/reference/commandline/pull.md b/docs/reference/commandline/pull.md index f100262fefba..66acb611da1b 100644 --- a/docs/reference/commandline/pull.md +++ b/docs/reference/commandline/pull.md @@ -11,10 +11,10 @@ Download an image from a registry | Name | Type | Default | Description | |:--------------------------|:---------|:--------|:-------------------------------------------------| -| `-a`, `--all-tags` | | | Download all tagged images in the repository | +| `-a`, `--all-tags` | `bool` | | Download all tagged images in the repository | | `--disable-content-trust` | `bool` | `true` | Skip image verification | | `--platform` | `string` | | Set platform if server is multi-platform capable | -| `-q`, `--quiet` | | | Suppress verbose output | +| `-q`, `--quiet` | `bool` | | Suppress verbose output | diff --git a/docs/reference/commandline/push.md b/docs/reference/commandline/push.md index b49467e99609..2d8358d6ff7f 100644 --- a/docs/reference/commandline/push.md +++ b/docs/reference/commandline/push.md @@ -11,10 +11,10 @@ Upload an image to a registry | Name | Type | Default | Description | |:--------------------------|:---------|:--------|:--------------------------------------------------------------------------------------------------------------------------------------------| -| `-a`, `--all-tags` | | | Push all tags of an image to the repository | +| `-a`, `--all-tags` | `bool` | | Push all tags of an image to the repository | | `--disable-content-trust` | `bool` | `true` | Skip image signing | | `--platform` | `string` | | Push a platform-specific manifest as a single-platform image to the registry.
'os[/arch[/variant]]': Explicit platform (eg. linux/amd64) | -| `-q`, `--quiet` | | | Suppress verbose output | +| `-q`, `--quiet` | `bool` | | Suppress verbose output | diff --git a/docs/reference/commandline/rm.md b/docs/reference/commandline/rm.md index 0c0bf058208e..4f9d92f42255 100644 --- a/docs/reference/commandline/rm.md +++ b/docs/reference/commandline/rm.md @@ -9,11 +9,11 @@ Remove one or more containers ### Options -| Name | Type | Default | Description | -|:------------------|:-----|:--------|:--------------------------------------------------------| -| `-f`, `--force` | | | Force the removal of a running container (uses SIGKILL) | -| `-l`, `--link` | | | Remove the specified link | -| `-v`, `--volumes` | | | Remove anonymous volumes associated with the container | +| Name | Type | Default | Description | +|:------------------|:-------|:--------|:--------------------------------------------------------| +| `-f`, `--force` | `bool` | | Force the removal of a running container (uses SIGKILL) | +| `-l`, `--link` | `bool` | | Remove the specified link | +| `-v`, `--volumes` | `bool` | | Remove anonymous volumes associated with the container | diff --git a/docs/reference/commandline/rmi.md b/docs/reference/commandline/rmi.md index 574fa03114d7..6aac0b757bf5 100644 --- a/docs/reference/commandline/rmi.md +++ b/docs/reference/commandline/rmi.md @@ -9,10 +9,10 @@ Remove one or more images ### Options -| Name | Type | Default | Description | -|:----------------|:-----|:--------|:-------------------------------| -| `-f`, `--force` | | | Force removal of the image | -| `--no-prune` | | | Do not delete untagged parents | +| Name | Type | Default | Description | +|:----------------|:-------|:--------|:-------------------------------| +| `-f`, `--force` | `bool` | | Force removal of the image | +| `--no-prune` | `bool` | | Do not delete untagged parents | diff --git a/docs/reference/commandline/run.md b/docs/reference/commandline/run.md index d7913196efa2..f9e0fbfcf26a 100644 --- a/docs/reference/commandline/run.md +++ b/docs/reference/commandline/run.md @@ -31,7 +31,7 @@ Create and run a new container from an image | `--cpus` | `decimal` | | Number of CPUs | | `--cpuset-cpus` | `string` | | CPUs in which to allow execution (0-3, 0,1) | | `--cpuset-mems` | `string` | | MEMs in which to allow execution (0-3, 0,1) | -| `-d`, `--detach` | | | Run container in background and print container ID | +| `-d`, `--detach` | `bool` | | Run container in background and print container ID | | `--detach-keys` | `string` | | Override the key sequence for detaching a container | | `--device` | `list` | | Add a host device to the container | | `--device-cgroup-rule` | `list` | | Add a rule to the cgroup allowed devices list | @@ -56,10 +56,10 @@ Create and run a new container from an image | `--health-start-interval` | `duration` | `0s` | Time between running the check during the start period (ms\|s\|m\|h) (default 0s) | | `--health-start-period` | `duration` | `0s` | Start period for the container to initialize before starting health-retries countdown (ms\|s\|m\|h) (default 0s) | | `--health-timeout` | `duration` | `0s` | Maximum time to allow one check to run (ms\|s\|m\|h) (default 0s) | -| `--help` | | | Print usage | +| `--help` | `bool` | | Print usage | | `-h`, `--hostname` | `string` | | Container host name | -| `--init` | | | Run an init inside the container that forwards signals and reaps processes | -| `-i`, `--interactive` | | | Keep STDIN open even if not attached | +| `--init` | `bool` | | Run an init inside the container that forwards signals and reaps processes | +| `-i`, `--interactive` | `bool` | | Keep STDIN open even if not attached | | `--io-maxbandwidth` | `bytes` | `0` | Maximum IO bandwidth limit for the system drive (Windows only) | | `--io-maxiops` | `uint64` | `0` | Maximum IOps limit for the system drive (Windows only) | | `--ip` | `string` | | IPv4 address (e.g., 172.30.100.104) | @@ -82,20 +82,20 @@ Create and run a new container from an image | `--name` | `string` | | Assign a name to the container | | `--network` | `network` | | Connect a container to a network | | `--network-alias` | `list` | | Add network-scoped alias for the container | -| `--no-healthcheck` | | | Disable any container-specified HEALTHCHECK | -| `--oom-kill-disable` | | | Disable OOM Killer | +| `--no-healthcheck` | `bool` | | Disable any container-specified HEALTHCHECK | +| `--oom-kill-disable` | `bool` | | Disable OOM Killer | | `--oom-score-adj` | `int` | `0` | Tune host's OOM preferences (-1000 to 1000) | | `--pid` | `string` | | PID namespace to use | | `--pids-limit` | `int64` | `0` | Tune container pids limit (set -1 for unlimited) | | `--platform` | `string` | | Set platform if server is multi-platform capable | -| `--privileged` | | | Give extended privileges to this container | +| `--privileged` | `bool` | | Give extended privileges to this container | | `-p`, `--publish` | `list` | | Publish a container's port(s) to the host | -| `-P`, `--publish-all` | | | Publish all exposed ports to random ports | +| `-P`, `--publish-all` | `bool` | | Publish all exposed ports to random ports | | `--pull` | `string` | `missing` | Pull image before running (`always`, `missing`, `never`) | -| `-q`, `--quiet` | | | Suppress the pull output | -| `--read-only` | | | Mount the container's root filesystem as read only | +| `-q`, `--quiet` | `bool` | | Suppress the pull output | +| `--read-only` | `bool` | | Mount the container's root filesystem as read only | | `--restart` | `string` | `no` | Restart policy to apply when a container exits | -| `--rm` | | | Automatically remove the container and its associated anonymous volumes when it exits | +| `--rm` | `bool` | | Automatically remove the container and its associated anonymous volumes when it exits | | `--runtime` | `string` | | Runtime to use for this container | | `--security-opt` | `list` | | Security Options | | `--shm-size` | `bytes` | `0` | Size of /dev/shm | @@ -105,7 +105,7 @@ Create and run a new container from an image | `--storage-opt` | `list` | | Storage driver options for the container | | `--sysctl` | `map` | `map[]` | Sysctl options | | `--tmpfs` | `list` | | Mount a tmpfs directory | -| `-t`, `--tty` | | | Allocate a pseudo-TTY | +| `-t`, `--tty` | `bool` | | Allocate a pseudo-TTY | | `--ulimit` | `ulimit` | | Ulimit options | | `-u`, `--user` | `string` | | Username or UID (format: [:]) | | `--userns` | `string` | | User namespace to use | diff --git a/docs/reference/commandline/search.md b/docs/reference/commandline/search.md index ddfbb8b3ebf8..d9d653039dc8 100644 --- a/docs/reference/commandline/search.md +++ b/docs/reference/commandline/search.md @@ -10,7 +10,7 @@ Search Docker Hub for images | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided | | [`--format`](#format) | `string` | | Pretty-print search using a Go template | | [`--limit`](#limit) | `int` | `0` | Max number of search results | -| [`--no-trunc`](#no-trunc) | | | Don't truncate output | +| [`--no-trunc`](#no-trunc) | `bool` | | Don't truncate output | diff --git a/docs/reference/commandline/secret_inspect.md b/docs/reference/commandline/secret_inspect.md index ba672bb2e03b..b5781d64f79a 100644 --- a/docs/reference/commandline/secret_inspect.md +++ b/docs/reference/commandline/secret_inspect.md @@ -8,7 +8,7 @@ Display detailed information on one or more secrets | Name | Type | Default | Description | |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`-f`](#format), [`--format`](#format) | `string` | | Format output using a custom template:
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | -| `--pretty` | | | Print the information in a human friendly format | +| `--pretty` | `bool` | | Print the information in a human friendly format | diff --git a/docs/reference/commandline/secret_ls.md b/docs/reference/commandline/secret_ls.md index 53abd742f5a2..856334e3674a 100644 --- a/docs/reference/commandline/secret_ls.md +++ b/docs/reference/commandline/secret_ls.md @@ -13,7 +13,7 @@ List secrets |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided | | [`--format`](#format) | `string` | | Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | -| `-q`, `--quiet` | | | Only display IDs | +| `-q`, `--quiet` | `bool` | | Only display IDs | diff --git a/docs/reference/commandline/service_create.md b/docs/reference/commandline/service_create.md index 32d274694e0e..db821e2afe41 100644 --- a/docs/reference/commandline/service_create.md +++ b/docs/reference/commandline/service_create.md @@ -13,7 +13,7 @@ Create a new service | [`--constraint`](#constraint) | `list` | | Placement constraints | | `--container-label` | `list` | | Container labels | | `--credential-spec` | `credential-spec` | | Credential spec for managed service account (Windows only) | -| `-d`, `--detach` | | | Exit immediately instead of waiting for the service to converge | +| `-d`, `--detach` | `bool` | | Exit immediately instead of waiting for the service to converge | | `--dns` | `list` | | Set custom DNS servers | | `--dns-option` | `list` | | Set DNS options | | `--dns-search` | `list` | | Set custom DNS search domains | @@ -31,7 +31,7 @@ Create a new service | `--health-timeout` | `duration` | | Maximum time to allow one check to run (ms\|s\|m\|h) | | `--host` | `list` | | Set one or more custom host-to-IP mappings (host:ip) | | [`--hostname`](#hostname) | `string` | | Container hostname | -| `--init` | | | Use an init inside each service container to forward signals and reap processes | +| `--init` | `bool` | | Use an init inside each service container to forward signals and reap processes | | [`--isolation`](#isolation) | `string` | | Service container isolation mode | | [`-l`](#label), [`--label`](#label) | `list` | | Service labels | | `--limit-cpu` | `decimal` | | Limit CPUs | @@ -44,12 +44,12 @@ Create a new service | [`--mount`](#mount) | `mount` | | Attach a filesystem mount to the service | | `--name` | `string` | | Service name | | [`--network`](#network) | `network` | | Network attachments | -| `--no-healthcheck` | | | Disable any container-specified HEALTHCHECK | -| `--no-resolve-image` | | | Do not query the registry to resolve image digest and supported platforms | +| `--no-healthcheck` | `bool` | | Disable any container-specified HEALTHCHECK | +| `--no-resolve-image` | `bool` | | Do not query the registry to resolve image digest and supported platforms | | [`--placement-pref`](#placement-pref) | `pref` | | Add a placement preference | | [`-p`](#publish), [`--publish`](#publish) | `port` | | Publish a port as a node port | -| `-q`, `--quiet` | | | Suppress progress output | -| `--read-only` | | | Mount the container's root filesystem as read only | +| `-q`, `--quiet` | `bool` | | Suppress progress output | +| `--read-only` | `bool` | | Mount the container's root filesystem as read only | | [`--replicas`](#replicas) | `uint` | | Number of tasks | | [`--replicas-max-per-node`](#replicas-max-per-node) | `uint64` | `0` | Maximum number of tasks per node (default 0 = unlimited) | | `--reserve-cpu` | `decimal` | | Reserve CPUs | @@ -68,7 +68,7 @@ Create a new service | `--stop-grace-period` | `duration` | | Time to wait before force killing a container (ns\|us\|ms\|s\|m\|h) (default 10s) | | `--stop-signal` | `string` | | Signal to stop the container | | `--sysctl` | `list` | | Sysctl options | -| `-t`, `--tty` | | | Allocate a pseudo-TTY | +| `-t`, `--tty` | `bool` | | Allocate a pseudo-TTY | | `--ulimit` | `ulimit` | | Ulimit options | | [`--update-delay`](#update-delay) | `duration` | `0s` | Delay between updates (ns\|us\|ms\|s\|m\|h) (default 0s) | | `--update-failure-action` | `string` | | Action on update failure (`pause`, `continue`, `rollback`) (default `pause`) | @@ -77,7 +77,7 @@ Create a new service | `--update-order` | `string` | | Update order (`start-first`, `stop-first`) (default `stop-first`) | | `--update-parallelism` | `uint64` | `1` | Maximum number of tasks updated simultaneously (0 to update all at once) | | `-u`, `--user` | `string` | | Username or UID (format: [:]) | -| [`--with-registry-auth`](#with-registry-auth) | | | Send registry authentication details to swarm agents | +| [`--with-registry-auth`](#with-registry-auth) | `bool` | | Send registry authentication details to swarm agents | | `-w`, `--workdir` | `string` | | Working directory inside the container | diff --git a/docs/reference/commandline/service_inspect.md b/docs/reference/commandline/service_inspect.md index 9bfd6f0afdab..97b73864130e 100644 --- a/docs/reference/commandline/service_inspect.md +++ b/docs/reference/commandline/service_inspect.md @@ -8,7 +8,7 @@ Display detailed information on one or more services | Name | Type | Default | Description | |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`-f`](#format), [`--format`](#format) | `string` | | Format output using a custom template:
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | -| [`--pretty`](#pretty) | | | Print the information in a human friendly format | +| [`--pretty`](#pretty) | `bool` | | Print the information in a human friendly format | diff --git a/docs/reference/commandline/service_logs.md b/docs/reference/commandline/service_logs.md index 43919400ffe5..6aa9903662e1 100644 --- a/docs/reference/commandline/service_logs.md +++ b/docs/reference/commandline/service_logs.md @@ -7,15 +7,15 @@ Fetch the logs of a service or task | Name | Type | Default | Description | |:---------------------|:---------|:--------|:------------------------------------------------------------------------------------------------| -| `--details` | | | Show extra details provided to logs | -| `-f`, `--follow` | | | Follow log output | -| `--no-resolve` | | | Do not map IDs to Names in output | -| `--no-task-ids` | | | Do not include task IDs in output | -| `--no-trunc` | | | Do not truncate output | -| `--raw` | | | Do not neatly format logs | +| `--details` | `bool` | | Show extra details provided to logs | +| `-f`, `--follow` | `bool` | | Follow log output | +| `--no-resolve` | `bool` | | Do not map IDs to Names in output | +| `--no-task-ids` | `bool` | | Do not include task IDs in output | +| `--no-trunc` | `bool` | | Do not truncate output | +| `--raw` | `bool` | | Do not neatly format logs | | `--since` | `string` | | Show logs since timestamp (e.g. `2013-01-02T13:23:37Z`) or relative (e.g. `42m` for 42 minutes) | | `-n`, `--tail` | `string` | `all` | Number of lines to show from the end of the logs | -| `-t`, `--timestamps` | | | Show timestamps | +| `-t`, `--timestamps` | `bool` | | Show timestamps | diff --git a/docs/reference/commandline/service_ls.md b/docs/reference/commandline/service_ls.md index 304568f840c2..789d5396d560 100644 --- a/docs/reference/commandline/service_ls.md +++ b/docs/reference/commandline/service_ls.md @@ -13,7 +13,7 @@ List services |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided | | [`--format`](#format) | `string` | | Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | -| `-q`, `--quiet` | | | Only display IDs | +| `-q`, `--quiet` | `bool` | | Only display IDs | diff --git a/docs/reference/commandline/service_ps.md b/docs/reference/commandline/service_ps.md index 9736315d71e6..ed570c26cc8c 100644 --- a/docs/reference/commandline/service_ps.md +++ b/docs/reference/commandline/service_ps.md @@ -9,9 +9,9 @@ List the tasks of one or more services |:---------------------------------------|:---------|:--------|:-------------------------------------------| | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided | | [`--format`](#format) | `string` | | Pretty-print tasks using a Go template | -| `--no-resolve` | | | Do not map IDs to Names | -| `--no-trunc` | | | Do not truncate output | -| `-q`, `--quiet` | | | Only display task IDs | +| `--no-resolve` | `bool` | | Do not map IDs to Names | +| `--no-trunc` | `bool` | | Do not truncate output | +| `-q`, `--quiet` | `bool` | | Only display task IDs | diff --git a/docs/reference/commandline/service_rollback.md b/docs/reference/commandline/service_rollback.md index 52aaf1ce3969..50b5413990ce 100644 --- a/docs/reference/commandline/service_rollback.md +++ b/docs/reference/commandline/service_rollback.md @@ -5,10 +5,10 @@ Revert changes to a service's configuration ### Options -| Name | Type | Default | Description | -|:-----------------|:-----|:--------|:----------------------------------------------------------------| -| `-d`, `--detach` | | | Exit immediately instead of waiting for the service to converge | -| `-q`, `--quiet` | | | Suppress progress output | +| Name | Type | Default | Description | +|:-----------------|:-------|:--------|:----------------------------------------------------------------| +| `-d`, `--detach` | `bool` | | Exit immediately instead of waiting for the service to converge | +| `-q`, `--quiet` | `bool` | | Suppress progress output | diff --git a/docs/reference/commandline/service_scale.md b/docs/reference/commandline/service_scale.md index 594e6aea9b90..9e611769dfc5 100644 --- a/docs/reference/commandline/service_scale.md +++ b/docs/reference/commandline/service_scale.md @@ -5,9 +5,9 @@ Scale one or multiple replicated services ### Options -| Name | Type | Default | Description | -|:-----------------|:-----|:--------|:----------------------------------------------------------------| -| `-d`, `--detach` | | | Exit immediately instead of waiting for the service to converge | +| Name | Type | Default | Description | +|:-----------------|:-------|:--------|:----------------------------------------------------------------| +| `-d`, `--detach` | `bool` | | Exit immediately instead of waiting for the service to converge | diff --git a/docs/reference/commandline/service_update.md b/docs/reference/commandline/service_update.md index 3c9d4ee96091..634b95dac367 100644 --- a/docs/reference/commandline/service_update.md +++ b/docs/reference/commandline/service_update.md @@ -17,7 +17,7 @@ Update a service | `--container-label-add` | `list` | | Add or update a container label | | `--container-label-rm` | `list` | | Remove a container label by its key | | `--credential-spec` | `credential-spec` | | Credential spec for managed service account (Windows only) | -| `-d`, `--detach` | | | Exit immediately instead of waiting for the service to converge | +| `-d`, `--detach` | `bool` | | Exit immediately instead of waiting for the service to converge | | `--dns-add` | `list` | | Add or update a custom DNS server | | `--dns-option-add` | `list` | | Add or update a DNS option | | `--dns-option-rm` | `list` | | Remove a DNS option | @@ -28,7 +28,7 @@ Update a service | `--entrypoint` | `command` | | Overwrite the default ENTRYPOINT of the image | | `--env-add` | `list` | | Add or update an environment variable | | `--env-rm` | `list` | | Remove an environment variable | -| `--force` | | | Force update even if no changes require it | +| `--force` | `bool` | | Force update even if no changes require it | | `--generic-resource-add` | `list` | | Add a Generic resource | | `--generic-resource-rm` | `list` | | Remove a Generic resource | | `--group-add` | `list` | | Add an additional supplementary user group to the container | @@ -43,7 +43,7 @@ Update a service | `--host-rm` | `list` | | Remove a custom host-to-IP mapping (`host:ip`) | | `--hostname` | `string` | | Container hostname | | `--image` | `string` | | Service image tag | -| `--init` | | | Use an init inside each service container to forward signals and reap processes | +| `--init` | `bool` | | Use an init inside each service container to forward signals and reap processes | | [`--isolation`](#isolation) | `string` | | Service container isolation mode | | `--label-add` | `list` | | Add or update a service label | | `--label-rm` | `list` | | Remove a label by its key | @@ -57,14 +57,14 @@ Update a service | `--mount-rm` | `list` | | Remove a mount by its target path | | [`--network-add`](#network-add) | `network` | | Add a network | | `--network-rm` | `list` | | Remove a network | -| `--no-healthcheck` | | | Disable any container-specified HEALTHCHECK | -| `--no-resolve-image` | | | Do not query the registry to resolve image digest and supported platforms | +| `--no-healthcheck` | `bool` | | Disable any container-specified HEALTHCHECK | +| `--no-resolve-image` | `bool` | | Do not query the registry to resolve image digest and supported platforms | | `--placement-pref-add` | `pref` | | Add a placement preference | | `--placement-pref-rm` | `pref` | | Remove a placement preference | | [`--publish-add`](#publish-add) | `port` | | Add or update a published port | | `--publish-rm` | `port` | | Remove a published port by its target port | -| `-q`, `--quiet` | | | Suppress progress output | -| `--read-only` | | | Mount the container's root filesystem as read only | +| `-q`, `--quiet` | `bool` | | Suppress progress output | +| `--read-only` | `bool` | | Mount the container's root filesystem as read only | | `--replicas` | `uint` | | Number of tasks | | `--replicas-max-per-node` | `uint64` | `0` | Maximum number of tasks per node (default 0 = unlimited) | | `--reserve-cpu` | `decimal` | | Reserve CPUs | @@ -73,7 +73,7 @@ Update a service | `--restart-delay` | `duration` | | Delay between restart attempts (ns\|us\|ms\|s\|m\|h) | | `--restart-max-attempts` | `uint` | | Maximum number of restarts before giving up | | `--restart-window` | `duration` | | Window used to evaluate the restart policy (ns\|us\|ms\|s\|m\|h) | -| [`--rollback`](#rollback) | | | Rollback to previous specification | +| [`--rollback`](#rollback) | `bool` | | Rollback to previous specification | | `--rollback-delay` | `duration` | `0s` | Delay between task rollbacks (ns\|us\|ms\|s\|m\|h) | | `--rollback-failure-action` | `string` | | Action on rollback failure (`pause`, `continue`) | | `--rollback-max-failure-ratio` | `float` | `0` | Failure rate to tolerate during a rollback | @@ -86,7 +86,7 @@ Update a service | `--stop-signal` | `string` | | Signal to stop the container | | `--sysctl-add` | `list` | | Add or update a Sysctl option | | `--sysctl-rm` | `list` | | Remove a Sysctl option | -| `-t`, `--tty` | | | Allocate a pseudo-TTY | +| `-t`, `--tty` | `bool` | | Allocate a pseudo-TTY | | `--ulimit-add` | `ulimit` | | Add or update a ulimit option | | `--ulimit-rm` | `list` | | Remove a ulimit option | | `--update-delay` | `duration` | `0s` | Delay between updates (ns\|us\|ms\|s\|m\|h) | @@ -96,7 +96,7 @@ Update a service | `--update-order` | `string` | | Update order (`start-first`, `stop-first`) | | [`--update-parallelism`](#update-parallelism) | `uint64` | `0` | Maximum number of tasks updated simultaneously (0 to update all at once) | | `-u`, `--user` | `string` | | Username or UID (format: [:]) | -| `--with-registry-auth` | | | Send registry authentication details to swarm agents | +| `--with-registry-auth` | `bool` | | Send registry authentication details to swarm agents | | `-w`, `--workdir` | `string` | | Working directory inside the container | diff --git a/docs/reference/commandline/stack_config.md b/docs/reference/commandline/stack_config.md index 411d6d61527b..0ad91cb8137c 100644 --- a/docs/reference/commandline/stack_config.md +++ b/docs/reference/commandline/stack_config.md @@ -8,7 +8,7 @@ Outputs the final config file, after doing merges and interpolations | Name | Type | Default | Description | |:-----------------------|:--------------|:--------|:--------------------------------------------------| | `-c`, `--compose-file` | `stringSlice` | | Path to a Compose file, or `-` to read from stdin | -| `--skip-interpolation` | | | Skip interpolation and output only merged config | +| `--skip-interpolation` | `bool` | | Skip interpolation and output only merged config | diff --git a/docs/reference/commandline/stack_deploy.md b/docs/reference/commandline/stack_deploy.md index 82934f6f9221..56313b44f807 100644 --- a/docs/reference/commandline/stack_deploy.md +++ b/docs/reference/commandline/stack_deploy.md @@ -13,10 +13,10 @@ Deploy a new stack or update an existing stack |:---------------------------------------------------------|:--------------|:---------|:--------------------------------------------------------------------------------------------------| | [`-c`](#compose-file), [`--compose-file`](#compose-file) | `stringSlice` | | Path to a Compose file, or `-` to read from stdin | | `-d`, `--detach` | `bool` | `true` | Exit immediately instead of waiting for the stack services to converge | -| `--prune` | | | Prune services that are no longer referenced | -| `-q`, `--quiet` | | | Suppress progress output | +| `--prune` | `bool` | | Prune services that are no longer referenced | +| `-q`, `--quiet` | `bool` | | Suppress progress output | | `--resolve-image` | `string` | `always` | Query the registry to resolve image digest and supported platforms (`always`, `changed`, `never`) | -| `--with-registry-auth` | | | Send registry authentication details to Swarm agents | +| `--with-registry-auth` | `bool` | | Send registry authentication details to Swarm agents | diff --git a/docs/reference/commandline/stack_ps.md b/docs/reference/commandline/stack_ps.md index b9d2c4798d17..c7d0c3deafde 100644 --- a/docs/reference/commandline/stack_ps.md +++ b/docs/reference/commandline/stack_ps.md @@ -9,9 +9,9 @@ List the tasks in the stack |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided | | [`--format`](#format) | `string` | | Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | -| [`--no-resolve`](#no-resolve) | | | Do not map IDs to Names | -| [`--no-trunc`](#no-trunc) | | | Do not truncate output | -| [`-q`](#quiet), [`--quiet`](#quiet) | | | Only display task IDs | +| [`--no-resolve`](#no-resolve) | `bool` | | Do not map IDs to Names | +| [`--no-trunc`](#no-trunc) | `bool` | | Do not truncate output | +| [`-q`](#quiet), [`--quiet`](#quiet) | `bool` | | Only display task IDs | diff --git a/docs/reference/commandline/stack_services.md b/docs/reference/commandline/stack_services.md index 251a6ce336db..db21f96bcafd 100644 --- a/docs/reference/commandline/stack_services.md +++ b/docs/reference/commandline/stack_services.md @@ -9,7 +9,7 @@ List the services in the stack |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Filter output based on conditions provided | | [`--format`](#format) | `string` | | Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | -| `-q`, `--quiet` | | | Only display IDs | +| `-q`, `--quiet` | `bool` | | Only display IDs | diff --git a/docs/reference/commandline/start.md b/docs/reference/commandline/start.md index d4ea72a7c112..b89b47deea73 100644 --- a/docs/reference/commandline/start.md +++ b/docs/reference/commandline/start.md @@ -11,11 +11,11 @@ Start one or more stopped containers | Name | Type | Default | Description | |:----------------------|:---------|:--------|:----------------------------------------------------| -| `-a`, `--attach` | | | Attach STDOUT/STDERR and forward signals | +| `-a`, `--attach` | `bool` | | Attach STDOUT/STDERR and forward signals | | `--checkpoint` | `string` | | Restore from this checkpoint | | `--checkpoint-dir` | `string` | | Use a custom checkpoint storage directory | | `--detach-keys` | `string` | | Override the key sequence for detaching a container | -| `-i`, `--interactive` | | | Attach container's STDIN | +| `-i`, `--interactive` | `bool` | | Attach container's STDIN | diff --git a/docs/reference/commandline/stats.md b/docs/reference/commandline/stats.md index f1fec24e4941..efb8cd129155 100644 --- a/docs/reference/commandline/stats.md +++ b/docs/reference/commandline/stats.md @@ -11,10 +11,10 @@ Display a live stream of container(s) resource usage statistics | Name | Type | Default | Description | |:--------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `-a`, `--all` | | | Show all containers (default shows just running) | +| `-a`, `--all` | `bool` | | Show all containers (default shows just running) | | `--format` | `string` | | Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | -| `--no-stream` | | | Disable streaming stats and only pull the first result | -| `--no-trunc` | | | Do not truncate output | +| `--no-stream` | `bool` | | Disable streaming stats and only pull the first result | +| `--no-trunc` | `bool` | | Do not truncate output | diff --git a/docs/reference/commandline/swarm_ca.md b/docs/reference/commandline/swarm_ca.md index 28861091732f..b7272591e61f 100644 --- a/docs/reference/commandline/swarm_ca.md +++ b/docs/reference/commandline/swarm_ca.md @@ -10,10 +10,10 @@ Display and rotate the root CA | `--ca-cert` | `pem-file` | | Path to the PEM-formatted root CA certificate to use for the new cluster | | `--ca-key` | `pem-file` | | Path to the PEM-formatted root CA key to use for the new cluster | | `--cert-expiry` | `duration` | `2160h0m0s` | Validity period for node certificates (ns\|us\|ms\|s\|m\|h) | -| [`-d`](#detach), [`--detach`](#detach) | | | Exit immediately instead of waiting for the root rotation to converge | +| [`-d`](#detach), [`--detach`](#detach) | `bool` | | Exit immediately instead of waiting for the root rotation to converge | | `--external-ca` | `external-ca` | | Specifications of one or more certificate signing endpoints | -| `-q`, `--quiet` | | | Suppress progress output | -| [`--rotate`](#rotate) | | | Rotate the swarm CA - if no certificate or key are provided, new ones will be generated | +| `-q`, `--quiet` | `bool` | | Suppress progress output | +| [`--rotate`](#rotate) | `bool` | | Rotate the swarm CA - if no certificate or key are provided, new ones will be generated | diff --git a/docs/reference/commandline/swarm_init.md b/docs/reference/commandline/swarm_init.md index 29897e8d0379..c189a98eedf7 100644 --- a/docs/reference/commandline/swarm_init.md +++ b/docs/reference/commandline/swarm_init.md @@ -8,7 +8,7 @@ Initialize a swarm | Name | Type | Default | Description | |:--------------------------------------------|:--------------|:---------------|:-----------------------------------------------------------------------------------------------------------------------------| | [`--advertise-addr`](#advertise-addr) | `string` | | Advertised address (format: `[:port]`) | -| [`--autolock`](#autolock) | | | Enable manager autolocking (requiring an unlock key to start a stopped manager) | +| [`--autolock`](#autolock) | `bool` | | Enable manager autolocking (requiring an unlock key to start a stopped manager) | | [`--availability`](#availability) | `string` | `active` | Availability of the node (`active`, `pause`, `drain`) | | `--cert-expiry` | `duration` | `2160h0m0s` | Validity period for node certificates (ns\|us\|ms\|s\|m\|h) | | [`--data-path-addr`](#data-path-addr) | `string` | | Address or interface to use for data path traffic (format: ``) | @@ -17,7 +17,7 @@ Initialize a swarm | `--default-addr-pool-mask-length` | `uint32` | `24` | default address pool subnet mask length | | `--dispatcher-heartbeat` | `duration` | `5s` | Dispatcher heartbeat period (ns\|us\|ms\|s\|m\|h) | | [`--external-ca`](#external-ca) | `external-ca` | | Specifications of one or more certificate signing endpoints | -| [`--force-new-cluster`](#force-new-cluster) | | | Force create a new cluster from current state | +| [`--force-new-cluster`](#force-new-cluster) | `bool` | | Force create a new cluster from current state | | [`--listen-addr`](#listen-addr) | `node-addr` | `0.0.0.0:2377` | Listen address (format: `[:port]`) | | [`--max-snapshots`](#max-snapshots) | `uint64` | `0` | Number of additional Raft snapshots to retain | | [`--snapshot-interval`](#snapshot-interval) | `uint64` | `10000` | Number of log entries between Raft snapshots | diff --git a/docs/reference/commandline/swarm_join-token.md b/docs/reference/commandline/swarm_join-token.md index 405209f9e1ec..56ba8c04ac90 100644 --- a/docs/reference/commandline/swarm_join-token.md +++ b/docs/reference/commandline/swarm_join-token.md @@ -5,10 +5,10 @@ Manage join tokens ### Options -| Name | Type | Default | Description | -|:----------------|:-----|:--------|:-------------------| -| `-q`, `--quiet` | | | Only display token | -| `--rotate` | | | Rotate join token | +| Name | Type | Default | Description | +|:----------------|:-------|:--------|:-------------------| +| `-q`, `--quiet` | `bool` | | Only display token | +| `--rotate` | `bool` | | Rotate join token | diff --git a/docs/reference/commandline/swarm_leave.md b/docs/reference/commandline/swarm_leave.md index 459daa3a0fb9..41fa8013d0e0 100644 --- a/docs/reference/commandline/swarm_leave.md +++ b/docs/reference/commandline/swarm_leave.md @@ -5,9 +5,9 @@ Leave the swarm ### Options -| Name | Type | Default | Description | -|:----------------|:-----|:--------|:------------------------------------------------------| -| `-f`, `--force` | | | Force this node to leave the swarm, ignoring warnings | +| Name | Type | Default | Description | +|:----------------|:-------|:--------|:------------------------------------------------------| +| `-f`, `--force` | `bool` | | Force this node to leave the swarm, ignoring warnings | diff --git a/docs/reference/commandline/swarm_unlock-key.md b/docs/reference/commandline/swarm_unlock-key.md index a2bbf72f9087..b5b53ecbbce5 100644 --- a/docs/reference/commandline/swarm_unlock-key.md +++ b/docs/reference/commandline/swarm_unlock-key.md @@ -5,10 +5,10 @@ Manage the unlock key ### Options -| Name | Type | Default | Description | -|:----------------|:-----|:--------|:-------------------| -| `-q`, `--quiet` | | | Only display token | -| `--rotate` | | | Rotate unlock key | +| Name | Type | Default | Description | +|:----------------|:-------|:--------|:-------------------| +| `-q`, `--quiet` | `bool` | | Only display token | +| `--rotate` | `bool` | | Rotate unlock key | diff --git a/docs/reference/commandline/swarm_update.md b/docs/reference/commandline/swarm_update.md index 4879d2ee5074..dd1650c683fb 100644 --- a/docs/reference/commandline/swarm_update.md +++ b/docs/reference/commandline/swarm_update.md @@ -7,7 +7,7 @@ Update the swarm | Name | Type | Default | Description | |:-------------------------|:--------------|:------------|:------------------------------------------------------------| -| `--autolock` | | | Change manager autolocking setting (true\|false) | +| `--autolock` | `bool` | | Change manager autolocking setting (true\|false) | | `--cert-expiry` | `duration` | `2160h0m0s` | Validity period for node certificates (ns\|us\|ms\|s\|m\|h) | | `--dispatcher-heartbeat` | `duration` | `5s` | Dispatcher heartbeat period (ns\|us\|ms\|s\|m\|h) | | `--external-ca` | `external-ca` | | Specifications of one or more certificate signing endpoints | diff --git a/docs/reference/commandline/system_df.md b/docs/reference/commandline/system_df.md index 98906152a706..9837aa93aaf5 100644 --- a/docs/reference/commandline/system_df.md +++ b/docs/reference/commandline/system_df.md @@ -8,7 +8,7 @@ Show docker disk usage | Name | Type | Default | Description | |:----------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`--format`](#format) | `string` | | Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | -| `-v`, `--verbose` | | | Show detailed information on space usage | +| `-v`, `--verbose` | `bool` | | Show detailed information on space usage | diff --git a/docs/reference/commandline/system_prune.md b/docs/reference/commandline/system_prune.md index 04b7ace8f762..49d20a564716 100644 --- a/docs/reference/commandline/system_prune.md +++ b/docs/reference/commandline/system_prune.md @@ -7,10 +7,10 @@ Remove unused data | Name | Type | Default | Description | |:----------------------|:---------|:--------|:---------------------------------------------------| -| `-a`, `--all` | | | Remove all unused images not just dangling ones | +| `-a`, `--all` | `bool` | | Remove all unused images not just dangling ones | | [`--filter`](#filter) | `filter` | | Provide filter values (e.g. `label==`) | -| `-f`, `--force` | | | Do not prompt for confirmation | -| `--volumes` | | | Prune anonymous volumes | +| `-f`, `--force` | `bool` | | Do not prompt for confirmation | +| `--volumes` | `bool` | | Prune anonymous volumes | diff --git a/docs/reference/commandline/trust_inspect.md b/docs/reference/commandline/trust_inspect.md index 5cb0ac0394b7..11c8ecf6d233 100644 --- a/docs/reference/commandline/trust_inspect.md +++ b/docs/reference/commandline/trust_inspect.md @@ -5,9 +5,9 @@ Return low-level information about keys and signatures ### Options -| Name | Type | Default | Description | -|:-----------|:-----|:--------|:-------------------------------------------------| -| `--pretty` | | | Print the information in a human friendly format | +| Name | Type | Default | Description | +|:-----------|:-------|:--------|:-------------------------------------------------| +| `--pretty` | `bool` | | Print the information in a human friendly format | diff --git a/docs/reference/commandline/trust_revoke.md b/docs/reference/commandline/trust_revoke.md index 06a2aa4eddc4..ed9efa52ab3d 100644 --- a/docs/reference/commandline/trust_revoke.md +++ b/docs/reference/commandline/trust_revoke.md @@ -5,9 +5,9 @@ Remove trust for an image ### Options -| Name | Type | Default | Description | -|:--------------|:-----|:--------|:-------------------------------| -| `-y`, `--yes` | | | Do not prompt for confirmation | +| Name | Type | Default | Description | +|:--------------|:-------|:--------|:-------------------------------| +| `-y`, `--yes` | `bool` | | Do not prompt for confirmation | diff --git a/docs/reference/commandline/trust_sign.md b/docs/reference/commandline/trust_sign.md index c5b8148224f8..c8596d571931 100644 --- a/docs/reference/commandline/trust_sign.md +++ b/docs/reference/commandline/trust_sign.md @@ -5,9 +5,9 @@ Sign an image ### Options -| Name | Type | Default | Description | -|:----------|:-----|:--------|:----------------------------| -| `--local` | | | Sign a locally tagged image | +| Name | Type | Default | Description | +|:----------|:-------|:--------|:----------------------------| +| `--local` | `bool` | | Sign a locally tagged image | diff --git a/docs/reference/commandline/trust_signer_remove.md b/docs/reference/commandline/trust_signer_remove.md index 5e425d5e6f79..2b8d52772934 100644 --- a/docs/reference/commandline/trust_signer_remove.md +++ b/docs/reference/commandline/trust_signer_remove.md @@ -5,9 +5,9 @@ Remove a signer ### Options -| Name | Type | Default | Description | -|:----------------|:-----|:--------|:----------------------------------------------------------------------| -| `-f`, `--force` | | | Do not prompt for confirmation before removing the most recent signer | +| Name | Type | Default | Description | +|:----------------|:-------|:--------|:----------------------------------------------------------------------| +| `-f`, `--force` | `bool` | | Do not prompt for confirmation before removing the most recent signer | diff --git a/docs/reference/commandline/volume_ls.md b/docs/reference/commandline/volume_ls.md index e5da1c8bf083..8420080a7347 100644 --- a/docs/reference/commandline/volume_ls.md +++ b/docs/reference/commandline/volume_ls.md @@ -11,10 +11,10 @@ List volumes | Name | Type | Default | Description | |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `--cluster` | | | Display only cluster volumes, and use cluster volume list formatting | +| `--cluster` | `bool` | | Display only cluster volumes, and use cluster volume list formatting | | [`-f`](#filter), [`--filter`](#filter) | `filter` | | Provide filter values (e.g. `dangling=true`) | | [`--format`](#format) | `string` | | Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | -| `-q`, `--quiet` | | | Only display volume names | +| `-q`, `--quiet` | `bool` | | Only display volume names | diff --git a/docs/reference/commandline/volume_prune.md b/docs/reference/commandline/volume_prune.md index d2671fa7a0ed..b0aa7061c524 100644 --- a/docs/reference/commandline/volume_prune.md +++ b/docs/reference/commandline/volume_prune.md @@ -7,9 +7,9 @@ Remove unused local volumes | Name | Type | Default | Description | |:------------------------------|:---------|:--------|:---------------------------------------------------| -| [`-a`](#all), [`--all`](#all) | | | Remove all unused volumes, not just anonymous ones | +| [`-a`](#all), [`--all`](#all) | `bool` | | Remove all unused volumes, not just anonymous ones | | [`--filter`](#filter) | `filter` | | Provide filter values (e.g. `label=