From f831be849b446df11229d26eb500194445c28cf4 Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Thu, 7 Jul 2016 20:43:18 +0200 Subject: [PATCH] Updates on cli reference documentation - Update ps with `--last` flag - Update commands with current output - Make sure hugo does not detect the wrong language - Update usage for `tag` command to be more coherent with the other ones Signed-off-by: Vincent Demeester (cherry picked from commit f4cfc6b9830ed236eb588d6a4dddca7455145e70) Signed-off-by: Tibor Vass --- api/client/container/cp.go | 1 + api/client/image/tag.go | 2 +- docs/reference/commandline/attach.md | 15 +- docs/reference/commandline/build.md | 54 +++--- docs/reference/commandline/cli.md | 29 ++- docs/reference/commandline/commit.md | 17 +- docs/reference/commandline/cp.md | 18 +- docs/reference/commandline/create.md | 161 +++++++++-------- docs/reference/commandline/diff.md | 9 +- docs/reference/commandline/events.md | 15 +- docs/reference/commandline/exec.md | 20 +- docs/reference/commandline/export.md | 11 +- docs/reference/commandline/history.md | 15 +- docs/reference/commandline/images.md | 28 +-- docs/reference/commandline/import.md | 15 +- docs/reference/commandline/info.md | 11 +- docs/reference/commandline/inspect.md | 16 +- docs/reference/commandline/kill.md | 11 +- docs/reference/commandline/load.md | 15 +- docs/reference/commandline/login.md | 15 +- docs/reference/commandline/logout.md | 11 +- docs/reference/commandline/logs.md | 19 +- docs/reference/commandline/network_connect.md | 19 +- .../commandline/network_disconnect.md | 12 +- docs/reference/commandline/network_inspect.md | 11 +- docs/reference/commandline/network_ls.md | 19 +- docs/reference/commandline/network_rm.md | 12 +- docs/reference/commandline/node_accept.md | 9 +- docs/reference/commandline/node_demote.md | 10 +- docs/reference/commandline/node_inspect.md | 14 +- docs/reference/commandline/node_ls.md | 18 +- docs/reference/commandline/node_promote.md | 9 +- docs/reference/commandline/node_rm.md | 18 +- docs/reference/commandline/node_tasks.md | 14 +- docs/reference/commandline/node_update.md | 9 +- docs/reference/commandline/pause.md | 9 +- docs/reference/commandline/plugin_disable.md | 9 +- docs/reference/commandline/plugin_enable.md | 9 +- docs/reference/commandline/plugin_inspect.md | 10 +- docs/reference/commandline/plugin_install.md | 11 +- docs/reference/commandline/plugin_ls.md | 13 +- docs/reference/commandline/plugin_rm.md | 13 +- docs/reference/commandline/port.md | 10 +- docs/reference/commandline/ps.md | 43 +++-- docs/reference/commandline/pull.md | 13 +- docs/reference/commandline/push.md | 11 +- docs/reference/commandline/rename.md | 9 +- docs/reference/commandline/restart.md | 11 +- docs/reference/commandline/rm.md | 15 +- docs/reference/commandline/rmi.md | 13 +- docs/reference/commandline/run.md | 171 ++++++++++-------- docs/reference/commandline/save.md | 11 +- docs/reference/commandline/search.md | 21 ++- docs/reference/commandline/service_create.md | 3 +- docs/reference/commandline/service_inspect.md | 2 +- docs/reference/commandline/service_ls.md | 2 - docs/reference/commandline/service_scale.md | 11 +- docs/reference/commandline/service_tasks.md | 4 +- docs/reference/commandline/service_update.md | 4 +- docs/reference/commandline/start.md | 15 +- docs/reference/commandline/stats.md | 13 +- docs/reference/commandline/stop.md | 12 +- docs/reference/commandline/swarm_init.md | 36 +++- docs/reference/commandline/swarm_join.md | 25 ++- docs/reference/commandline/swarm_leave.md | 11 +- docs/reference/commandline/swarm_update.md | 21 ++- docs/reference/commandline/tag.md | 9 +- docs/reference/commandline/top.md | 9 +- docs/reference/commandline/unpause.md | 9 +- docs/reference/commandline/update.md | 31 ++-- docs/reference/commandline/version.md | 11 +- docs/reference/commandline/volume_create.md | 17 +- docs/reference/commandline/volume_inspect.md | 11 +- docs/reference/commandline/volume_ls.md | 22 ++- docs/reference/commandline/volume_rm.md | 12 +- docs/reference/commandline/wait.md | 9 +- 76 files changed, 828 insertions(+), 555 deletions(-) diff --git a/api/client/container/cp.go b/api/client/container/cp.go index 6870ef3c18..a0031c8b00 100644 --- a/api/client/container/cp.go +++ b/api/client/container/cp.go @@ -44,6 +44,7 @@ func NewCopyCommand(dockerCli *client.DockerCli) *cobra.Command { docker cp [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATH`, Short: "Copy files/folders between a container and the local filesystem", Long: strings.Join([]string{ + "Copy files/folders between a container and the local filesystem\n", "\nUse '-' as the source to read a tar archive from stdin\n", "and extract it to a directory destination in a container.\n", "Use '-' as the destination to stream a tar archive of a\n", diff --git a/api/client/image/tag.go b/api/client/image/tag.go index 5c0b569fb5..665e3430c7 100644 --- a/api/client/image/tag.go +++ b/api/client/image/tag.go @@ -18,7 +18,7 @@ func NewTagCommand(dockerCli *client.DockerCli) *cobra.Command { var opts tagOptions cmd := &cobra.Command{ - Use: "tag IMAGE[:TAG] [REGISTRYHOST/][USERNAME/]NAME[:TAG]", + Use: "tag IMAGE[:TAG] IMAGE[:TAG]", Short: "Tag an image into a repository", Args: cli.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { diff --git a/docs/reference/commandline/attach.md b/docs/reference/commandline/attach.md index b70c26f452..dd581ace9a 100644 --- a/docs/reference/commandline/attach.md +++ b/docs/reference/commandline/attach.md @@ -10,14 +10,17 @@ parent = "smn_cli" # attach - Usage: docker attach [OPTIONS] CONTAINER +```markdown +Usage: docker attach [OPTIONS] CONTAINER - Attach to a running container +Attach to a running container - --detach-keys="" Set up escape key sequence - --help Print usage - --no-stdin Do not attach STDIN - --sig-proxy=true Proxy all received signals to the process +Options: + --detach-keys string Override the key sequence for detaching a container + --help Print usage + --no-stdin Do not attach STDIN + --sig-proxy Proxy all received signals to the process (default true) +``` The `docker attach` command allows you to attach to a running container using the container's ID or name, either to view its ongoing output or to control it diff --git a/docs/reference/commandline/build.md b/docs/reference/commandline/build.md index 72426d659e..00fd85d61f 100644 --- a/docs/reference/commandline/build.md +++ b/docs/reference/commandline/build.md @@ -10,32 +10,38 @@ parent = "smn_cli" # build - Usage: docker build [OPTIONS] PATH | URL | - +```markdown +Usage: docker build [OPTIONS] PATH | URL | - - Build a new image from the source code at PATH +Build an image from a Dockerfile - --build-arg=[] Set build-time variables - --cpu-shares CPU Shares (relative weight) - --cgroup-parent="" Optional parent cgroup for the container - --cpu-period=0 Limit the CPU CFS (Completely Fair Scheduler) period - --cpu-quota=0 Limit the CPU CFS (Completely Fair Scheduler) quota - --cpuset-cpus="" CPUs in which to allow execution, e.g. `0-3`, `0,1` - --cpuset-mems="" MEMs in which to allow execution, e.g. `0-3`, `0,1` - --disable-content-trust=true Skip image verification - -f, --file="" Name of the Dockerfile (Default is 'PATH/Dockerfile') - --force-rm Always remove intermediate containers - --help Print usage - --isolation="" Container isolation technology - --label=[] Set metadata for an image - -m, --memory="" Memory limit for all build containers - --memory-swap="" A positive integer equal to memory plus swap. Specify -1 to enable unlimited swap. - --no-cache Do not use cache when building the image - --pull Always attempt to pull a newer version of the image - -q, --quiet Suppress the build output and print image ID on success - --rm=true Remove intermediate containers after a successful build - --shm-size=[] Size of `/dev/shm`. The format is ``. `number` must be greater than `0`. Unit is optional and can be `b` (bytes), `k` (kilobytes), `m` (megabytes), or `g` (gigabytes). If you omit the unit, the system uses bytes. If you omit the size entirely, the system uses `64m`. - -t, --tag=[] Name and optionally a tag in the 'name:tag' format - --ulimit=[] Ulimit options +Options: + --build-arg value Set build-time variables (default []) + --cgroup-parent string Optional parent cgroup for the container + --cpu-period int Limit the CPU CFS (Completely Fair Scheduler) period + --cpu-quota int Limit the CPU CFS (Completely Fair Scheduler) quota + -c, --cpu-shares int 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 Skip image verification (default true) + -f, --file string Name of the Dockerfile (Default is 'PATH/Dockerfile') + --force-rm Always remove intermediate containers + --help Print usage + --isolation string Container isolation technology + --label value Set metadata for an image (default []) + -m, --memory string Memory limit + --memory-swap string Swap limit equal to memory plus swap: '-1' to enable unlimited swap + --no-cache Do not use cache when building the image + --pull Always attempt to pull a newer version of the image + -q, --quiet Suppress the build output and print image ID on success + --rm Remove intermediate containers after a successful build (default true) + --shm-size string Size of /dev/shm, default value is 64MB. + The format is ``. `number` must be greater than `0`. + Unit is optional and can be `b` (bytes), `k` (kilobytes), `m` (megabytes), + or `g` (gigabytes). If you omit the unit, the system uses bytes. + -t, --tag value Name and optionally a tag in the 'name:tag' format (default []) + --ulimit value Ulimit options (default []) +``` Builds Docker images from a Dockerfile and a "context". A build's context is the files located in the specified `PATH` or `URL`. The build process can refer diff --git a/docs/reference/commandline/cli.md b/docs/reference/commandline/cli.md index ac5f62d4bb..746b84b03a 100644 --- a/docs/reference/commandline/cli.md +++ b/docs/reference/commandline/cli.md @@ -14,16 +14,31 @@ weight = -2 To list available commands, either run `docker` with no parameters or execute `docker help`: - $ docker - Usage: docker [OPTIONS] COMMAND [arg...] - docker daemon [ --help | ... ] - docker [ --help | -v | --version ] +```bash +$ docker +Usage: docker [OPTIONS] COMMAND [arg...] + docker [ --help | -v | --version ] - -H, --host=[]: The socket(s) to talk to the Docker daemon in the format of tcp://host:port/path, unix:///path/to/socket, fd://* or fd://socketfd. +A self-sufficient runtime for containers. - A self-sufficient runtime for Linux containers. +Options: - ... + --config=~/.docker Location of client config files + -D, --debug Enable debug mode + -H, --host=[] Daemon socket(s) to connect to + -h, --help Print usage + -l, --log-level=info Set the logging level + --tls Use TLS; implied by --tlsverify + --tlscacert=~/.docker/ca.pem Trust certs signed only by this CA + --tlscert=~/.docker/cert.pem Path to TLS certificate file + --tlskey=~/.docker/key.pem Path to TLS key file + --tlsverify Use TLS and verify the remote + -v, --version Print version information and quit + +Commands: + attach Attach to a running container + # […] +``` 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 diff --git a/docs/reference/commandline/commit.md b/docs/reference/commandline/commit.md index ad25f64c84..acfb7c95be 100644 --- a/docs/reference/commandline/commit.md +++ b/docs/reference/commandline/commit.md @@ -10,15 +10,18 @@ parent = "smn_cli" # commit - Usage: docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]] +```markdown +Usage: docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]] - Create a new image from a container's changes +Create a new image from a container's changes - -a, --author="" Author (e.g., "John Hannibal Smith ") - -c, --change=[] Apply specified Dockerfile instructions while committing the image - --help Print usage - -m, --message="" Commit message - -p, --pause=true Pause container during commit +Options: + -a, --author string Author (e.g., "John Hannibal Smith ") + -c, --change value Apply Dockerfile instruction to the created image (default []) + --help Print usage + -m, --message string Commit message + -p, --pause Pause container during commit (default true) +``` It can be useful to commit a container's file changes or settings into a new image. This allows you debug a container by running an interactive shell, or to diff --git a/docs/reference/commandline/cp.md b/docs/reference/commandline/cp.md index 8afabc95bc..b3a0b78916 100644 --- a/docs/reference/commandline/cp.md +++ b/docs/reference/commandline/cp.md @@ -10,13 +10,21 @@ parent = "smn_cli" # cp - Usage: docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH | - - docker cp [OPTIONS] SRC_PATH | - CONTAINER:DEST_PATH +```markdown +Usage: docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|- + docker cp [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATH - Copy files/folders between a container and the local filesystem +Copy files/folders between a container and the local filesystem - -L, --follow-link Always follow symbol link in SRC_PATH - --help Print usage +Use '-' as the source to read a tar archive from stdin +and extract it to a directory destination in a container. +Use '-' as the destination to stream a tar archive of a +container source to stdout. + +Options: + -L, --follow-link Always follow symbol link in SRC_PATH + --help Print usage +``` The `docker cp` utility copies the contents of `SRC_PATH` to the `DEST_PATH`. You can copy from the container's file system to the local machine or the diff --git a/docs/reference/commandline/create.md b/docs/reference/commandline/create.md index fb84d38794..49f0c96c3b 100644 --- a/docs/reference/commandline/create.md +++ b/docs/reference/commandline/create.md @@ -12,95 +12,110 @@ parent = "smn_cli" Creates a new container. - Usage: docker create [OPTIONS] IMAGE [COMMAND] [ARG...] +```markdown +Usage: docker create [OPTIONS] IMAGE [COMMAND] [ARG...] - Create a new container +Create a new container - -a, --attach=[] Attach to STDIN, STDOUT or STDERR - --add-host=[] Add a custom host-to-IP mapping (host:ip) - --blkio-weight=0 Block IO weight (relative weight) - --blkio-weight-device=[] Block IO weight (relative device weight, format: `DEVICE_NAME:WEIGHT`) - --cpu-shares=0 CPU shares (relative weight) - --cap-add=[] Add Linux capabilities - --cap-drop=[] Drop Linux capabilities - --cgroup-parent="" Optional parent cgroup for the container - --cidfile="" Write the container ID to the file - --cpu-period=0 Limit CPU CFS (Completely Fair Scheduler) period - --cpu-quota=0 Limit CPU CFS (Completely Fair Scheduler) quota - --cpuset-cpus="" CPUs in which to allow execution (0-3, 0,1) - --cpuset-mems="" Memory nodes (MEMs) in which to allow execution (0-3, 0,1) - --device=[] Add a host device to the container - --device-read-bps=[] Limit read rate (bytes per second) from a device (e.g., --device-read-bps=/dev/sda:1mb) - --device-read-iops=[] Limit read rate (IO per second) from a device (e.g., --device-read-iops=/dev/sda:1000) - --device-write-bps=[] Limit write rate (bytes per second) to a device (e.g., --device-write-bps=/dev/sda:1mb) - --device-write-iops=[] Limit write rate (IO per second) to a device (e.g., --device-write-iops=/dev/sda:1000) - --disable-content-trust=true Skip image verification - --dns=[] Set custom DNS servers - --dns-opt=[] Set custom DNS options - --dns-search=[] Set custom DNS search domains - -e, --env=[] Set environment variables - --entrypoint="" Overwrite the default ENTRYPOINT of the image - --env-file=[] Read in a file of environment variables - --expose=[] Expose a port or a range of ports - --group-add=[] Add additional groups to join - -h, --hostname="" Container host name +Options: + --add-host value Add a custom host-to-IP mapping (host:ip) (default []) + -a, --attach value Attach to STDIN, STDOUT or STDERR (default []) + --blkio-weight value Block IO (relative weight), between 10 and 1000 + --blkio-weight-device value Block IO weight (relative device weight) (default []) + --cap-add value Add Linux capabilities (default []) + --cap-drop value Drop Linux capabilities (default []) + --cgroup-parent string Optional parent cgroup for the container + --cidfile string Write the container ID to the file + --cpu-percent int CPU percent (Windows only) + --cpu-period int Limit CPU CFS (Completely Fair Scheduler) period + --cpu-quota int Limit CPU CFS (Completely Fair Scheduler) quota + -c, --cpu-shares int 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) + --device value Add a host device to the container (default []) + --device-read-bps value Limit read rate (bytes per second) from a device (default []) + --device-read-iops value Limit read rate (IO per second) from a device (default []) + --device-write-bps value Limit write rate (bytes per second) to a device (default []) + --device-write-iops value Limit write rate (IO per second) to a device (default []) + --disable-content-trust Skip image verification (default true) + --dns value Set custom DNS servers (default []) + --dns-opt value Set DNS options (default []) + --dns-search value Set custom DNS search domains (default []) + --entrypoint string Overwrite the default ENTRYPOINT of the image + -e, --env value Set environment variables (default []) + --env-file value Read in a file of environment variables (default []) + --expose value Expose a port or a range of ports (default []) + --group-add value Add additional groups to join (default []) + --health-cmd string Command to run to check health + --health-interval duration Time between running the check + --health-retries int Consecutive failures needed to report unhealthy + --health-timeout duration Maximum time to allow one check to run --help Print usage - -i, --interactive Keep STDIN open even if not attached - --ip="" Container IPv4 address (e.g. 172.30.100.104) - --ip6="" Container IPv6 address (e.g. 2001:db8::33) - --ipc="" IPC namespace to use - --isolation="" Container isolation technology - --kernel-memory="" Kernel memory limit - -l, --label=[] Set metadata on the container (e.g., --label=com.example.key=value) - --label-file=[] Read in a line delimited file of labels - --link=[] Add link to another container - --link-local-ip=[] Container IPv4/IPv6 link-local addresses (e.g. 169.254.0.77, fe80::77) - --log-driver="" Logging driver for container - --log-opt=[] Log driver specific options - -m, --memory="" Memory limit - --mac-address="" Container MAC address (e.g. 92:d0:c6:0a:29:33) - --memory-reservation="" Memory soft limit - --memory-swap="" A positive integer equal to memory plus swap. Specify -1 to enable unlimited swap. - --memory-swappiness="" Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. - --name="" Assign a name to the container - --net="bridge" Connect a container to a network + -h, --hostname string Container host name + -i, --interactive Keep STDIN open even if not attached + --io-maxbandwidth string Maximum IO bandwidth limit for the system drive (Windows only) + --io-maxiops uint Maximum IOps limit for the system drive (Windows only) + --ip string Container IPv4 address (e.g. 172.30.100.104) + --ip6 string Container IPv6 address (e.g. 2001:db8::33) + --ipc string IPC namespace to use + --isolation string Container isolation technology + --kernel-memory string Kernel memory limit + -l, --label value Set meta data on a container (default []) + --label-file value Read in a line delimited file of labels (default []) + --link value Add link to another container (default []) + --link-local-ip value Container IPv4/IPv6 link-local addresses (default []) + --log-driver string Logging driver for container + --log-opt value Log driver options (default []) + --mac-address string Container MAC address (e.g. 92:d0:c6:0a:29:33) + -m, --memory string Memory limit + --memory-reservation string Memory soft limit + --memory-swap string Swap limit equal to memory plus swap: '-1' to enable unlimited swap + --memory-swappiness int Tune container memory swappiness (0 to 100) (default -1) + --name string Assign a name to the container + --net string Connect a container to a network (default "default") 'bridge': create a network stack on the default Docker bridge 'none': no networking 'container:': reuse another container's network stack 'host': use the Docker host network stack '|': connect to a user-defined network - --net-alias=[] Add network-scoped alias for the container - --oom-kill-disable Whether to disable OOM Killer for the container or not - --oom-score-adj=0 Tune the host's OOM preferences for containers (accepts -1000 to 1000) - -P, --publish-all Publish all exposed ports to random ports - -p, --publish=[] Publish a container's port(s) to the host - --pid="" PID namespace to use - --pids-limit=-1 Tune container pids limit (set -1 for unlimited), kernel >= 4.3 + --net-alias value Add network-scoped alias for the container (default []) + --no-healthcheck Disable any container-specified HEALTHCHECK + --oom-kill-disable Disable OOM Killer + --oom-score-adj int Tune host's OOM preferences (-1000 to 1000) + --pid string PID namespace to use + --pids-limit int Tune container pids limit (set -1 for unlimited), kernel >= 4.3 --privileged Give extended privileges to this container + -p, --publish value Publish a container's port(s) to the host (default []) + -P, --publish-all Publish all exposed ports to random ports --read-only Mount the container's root filesystem as read only - --restart="no" Restart policy (no, on-failure[:max-retry], always, unless-stopped) - --runtime="" Name of the runtime to be used for that container - --security-opt=[] Security options - --stop-signal="SIGTERM" Signal to stop a container - --shm-size=[] Size of `/dev/shm`. The format is ``. `number` must be greater than `0`. Unit is optional and can be `b` (bytes), `k` (kilobytes), `m` (megabytes), or `g` (gigabytes). If you omit the unit, the system uses bytes. If you omit the size entirely, the system uses `64m`. - --storage-opt=[] Set storage driver options per container - --sysctl[=*[]*]] Configure namespaced kernel parameters at runtime - -t, --tty Allocate a pseudo-TTY - -u, --user="" Username or UID - --userns="" Container user namespace + --restart string Restart policy to apply when a container exits (default "no") + Possible values are: no, on-failure[:max-retry], always, unless-stopped + --runtime string Runtime to use for this container + --security-opt value Security Options (default []) + --shm-size string Size of /dev/shm, default value is 64MB. + The format is ``. `number` must be greater than `0`. + Unit is optional and can be `b` (bytes), `k` (kilobytes), `m` (megabytes), + or `g` (gigabytes). If you omit the unit, the system uses bytes. + --stop-signal string Signal to stop a container, SIGTERM by default (default "SIGTERM") + --storage-opt value Set storage driver options per container (default []) + --sysctl value Sysctl options (default map[]) + --tmpfs value Mount a tmpfs directory (default []) + -t, --tty Allocate a pseudo-TTY + --ulimit value Ulimit options (default []) + -u, --user string Username or UID (format: [:]) + --userns string User namespace to use 'host': Use the Docker host user namespace '': Use the Docker daemon user namespace specified by `--userns-remap` option. - --ulimit=[] Ulimit options - --uts="" UTS namespace to use - -v, --volume=[host-src:]container-dest[:] - Bind mount a volume. The comma-delimited + --uts string UTS namespace to use + -v, --volume value Bind mount a volume (default []). The comma-delimited `options` are [rw|ro], [z|Z], [[r]shared|[r]slave|[r]private], and [nocopy]. The 'host-src' is an absolute path or a name value. - --volume-driver="" Container's volume driver - --volumes-from=[] Mount volumes from the specified container(s) - -w, --workdir="" Working directory inside the container + --volume-driver string Optional volume driver for the container + --volumes-from value Mount volumes from the specified container(s) (default []) + -w, --workdir string Working directory inside the container +``` The `docker create` command creates a writeable container layer over the specified image and prepares it for running the specified command. The diff --git a/docs/reference/commandline/diff.md b/docs/reference/commandline/diff.md index bda74eadad..8c01b8cdf2 100644 --- a/docs/reference/commandline/diff.md +++ b/docs/reference/commandline/diff.md @@ -10,11 +10,14 @@ parent = "smn_cli" # diff - Usage: docker diff [OPTIONS] CONTAINER +```markdown +Usage: docker diff CONTAINER - Inspect changes on a container's filesystem +Inspect changes on a container's filesystem - --help Print usage +Options: + --help Print usage +``` List the changed files and directories in a container᾿s filesystem There are 3 events that are listed in the `diff`: diff --git a/docs/reference/commandline/events.md b/docs/reference/commandline/events.md index 688c05a907..c966289d59 100644 --- a/docs/reference/commandline/events.md +++ b/docs/reference/commandline/events.md @@ -10,14 +10,17 @@ parent = "smn_cli" # events - Usage: docker events [OPTIONS] +```markdown +Usage: docker events [OPTIONS] - Get real time events from the server +Get real time events from the server - -f, --filter=[] Filter output based on conditions provided - --help Print usage - --since="" Show all events created since timestamp - --until="" Stream events until this timestamp +Options: + -f, --filter value Filter output based on conditions provided (default []) + --help Print usage + --since string Show all events created since timestamp + --until string Stream events until this timestamp +``` Docker containers report the following events: diff --git a/docs/reference/commandline/exec.md b/docs/reference/commandline/exec.md index 80796a59c9..a5e1d3c9c5 100644 --- a/docs/reference/commandline/exec.md +++ b/docs/reference/commandline/exec.md @@ -10,17 +10,19 @@ parent = "smn_cli" # exec - Usage: docker exec [OPTIONS] CONTAINER COMMAND [ARG...] +```markdown +Usage: docker exec [OPTIONS] CONTAINER COMMAND [ARG...] - Run a command in a running container +Run a command in a running container - -d, --detach Detached mode: run command in the background - --detach-keys Specify the escape key sequence used to detach a container - --help Print usage - -i, --interactive Keep STDIN open even if not attached - --privileged Give extended Linux capabilities to the command - -t, --tty Allocate a pseudo-TTY - -u, --user= Username or UID (format: [:]) + -d, --detach Detached mode: run command in the background + --detach-keys Override the key sequence for detaching a container + --help Print usage + -i, --interactive Keep STDIN open even if not attached + --privileged Give extended privileges to the command + -t, --tty Allocate a pseudo-TTY + -u, --user Username or UID (format: [:]) +``` The `docker exec` command runs a new command in a running container. diff --git a/docs/reference/commandline/export.md b/docs/reference/commandline/export.md index 90ffec62be..54e6e01a6e 100644 --- a/docs/reference/commandline/export.md +++ b/docs/reference/commandline/export.md @@ -10,12 +10,15 @@ parent = "smn_cli" # export - Usage: docker export [OPTIONS] CONTAINER +```markdown +Usage: docker export [OPTIONS] CONTAINER - Export the contents of a container's filesystem as a tar archive +Export a container's filesystem as a tar archive - --help Print usage - -o, --output="" Write to a file, instead of STDOUT +Options: + --help Print usage + -o, --output string Write to a file, instead of STDOUT +``` The `docker export` command does not export the contents of volumes associated with the container. If a volume is mounted on top of an existing directory in diff --git a/docs/reference/commandline/history.md b/docs/reference/commandline/history.md index d8750d83c0..895fd55ea9 100644 --- a/docs/reference/commandline/history.md +++ b/docs/reference/commandline/history.md @@ -10,14 +10,17 @@ parent = "smn_cli" # history - Usage: docker history [OPTIONS] IMAGE +```markdown +Usage: docker history [OPTIONS] IMAGE - Show the history of an image +Show the history of an image - -H, --human=true Print sizes and dates in human readable format - --help Print usage - --no-trunc Don't truncate output - -q, --quiet Only show numeric IDs +Options: + --help Print usage + -H, --human Print sizes and dates in human readable format (default true) + --no-trunc Don't truncate output + -q, --quiet Only show numeric IDs +``` To see how the `docker:latest` image was built: diff --git a/docs/reference/commandline/images.md b/docs/reference/commandline/images.md index b9f80980b0..af21a8197d 100644 --- a/docs/reference/commandline/images.md +++ b/docs/reference/commandline/images.md @@ -10,20 +10,24 @@ parent = "smn_cli" # images - Usage: docker images [OPTIONS] [REPOSITORY[:TAG]] +```markdown +Usage: docker images [OPTIONS] [REPOSITORY[:TAG]] - List images +List images - -a, --all Show all images (default hides intermediate images) - --digests Show digests - -f, --filter=[] Filter output based on these conditions: - - dangling=(true|false) - - label= or label== - - before=([:tag]||) - - since=([:tag]||) - --help Print usage - --no-trunc Don't truncate output - -q, --quiet Only show numeric IDs +Options: + -a, --all Show all images (default hides intermediate images) + --digests Show digests + -f, --filter value Filter output based on conditions provided (default []) + - dangling=(true|false) + - label= or label== + - before=([:tag]||) + - since=([:tag]||) + --format string Pretty-print images using a Go template + --help Print usage + --no-trunc Don't truncate output + -q, --quiet Only show numeric IDs +``` The default `docker images` will show all top level images, their repository and tags, and their size. diff --git a/docs/reference/commandline/import.md b/docs/reference/commandline/import.md index d4ca8d5775..2d2c88b4e8 100644 --- a/docs/reference/commandline/import.md +++ b/docs/reference/commandline/import.md @@ -10,15 +10,16 @@ parent = "smn_cli" # import - Usage: docker import file|URL|- [REPOSITORY[:TAG]] +```markdown +Usage: docker import [OPTIONS] file|URL|- [REPOSITORY[:TAG]] - Create an empty filesystem image and import the contents of the - tarball (.tar, .tar.gz, .tgz, .bzip, .tar.xz, .txz) into it, then - optionally tag it. +Import the contents from a tarball to create a filesystem image - -c, --change=[] Apply specified Dockerfile instructions while importing the image - --help Print usage - -m, --message= Set commit message for imported image +Options: + -c, --change value Apply Dockerfile instruction to the created image (default []) + --help Print usage + -m, --message string Set commit message for imported image +``` You can specify a `URL` or `-` (dash) to take data directly from `STDIN`. The `URL` can point to an archive (.tar, .tar.gz, .tgz, .bzip, .tar.xz, or .txz) diff --git a/docs/reference/commandline/info.md b/docs/reference/commandline/info.md index 21f483c282..88514d1606 100644 --- a/docs/reference/commandline/info.md +++ b/docs/reference/commandline/info.md @@ -10,13 +10,14 @@ parent = "smn_cli" # info +```markdown +Usage: docker info - Usage: docker info [OPTIONS] - - Display system-wide information - - --help Print usage +Display system-wide information +Options: + --help Print usage +``` This command displays system wide information regarding the Docker installation. Information displayed includes the kernel version, number of containers and images. diff --git a/docs/reference/commandline/inspect.md b/docs/reference/commandline/inspect.md index 34b60fbd46..7ccc7f7392 100644 --- a/docs/reference/commandline/inspect.md +++ b/docs/reference/commandline/inspect.md @@ -10,15 +10,17 @@ parent = "smn_cli" # inspect - Usage: docker inspect [OPTIONS] CONTAINER|IMAGE|TASK [CONTAINER|IMAGE|TASK...] +```markdown +Usage: docker inspect [OPTIONS] CONTAINER|IMAGE|TASK [CONTAINER|IMAGE|TASK...] - Return low-level information on a container or image or task +Return low-level information on a container, image or task - -f, --format="" Format the output using the given go template - --help Print usage - --type=container|image|task Return JSON for specified type, permissible - values are "image" or "container" or "task" - -s, --size Display total file sizes if the type is container + -f, --format Format the output using the given go template + --help Print usage + -s, --size Display total file sizes if the type is container + values are "image" or "container" or "task + --type Return JSON for specified type, (e.g image, container or task) +``` By default, this will render all results in a JSON array. If the container and image have the same name, this will return container JSON for unspecified type. diff --git a/docs/reference/commandline/kill.md b/docs/reference/commandline/kill.md index 6f20258707..e85ba61657 100644 --- a/docs/reference/commandline/kill.md +++ b/docs/reference/commandline/kill.md @@ -10,12 +10,15 @@ parent = "smn_cli" # kill - Usage: docker kill [OPTIONS] CONTAINER [CONTAINER...] +```markdown +Usage: docker kill [OPTIONS] CONTAINER [CONTAINER...] - Kill a running container using SIGKILL or a specified signal +Kill one or more running container - --help Print usage - -s, --signal="KILL" Signal to send to the container +Options: + --help Print usage + -s, --signal string Signal to send to the container (default "KILL") +``` The main process inside the container will be sent `SIGKILL`, or any signal specified with option `--signal`. diff --git a/docs/reference/commandline/load.md b/docs/reference/commandline/load.md index 60f4076c77..be8ed05cf2 100644 --- a/docs/reference/commandline/load.md +++ b/docs/reference/commandline/load.md @@ -10,14 +10,17 @@ parent = "smn_cli" # load - Usage: docker load [OPTIONS] +```markdown +Usage: docker load [OPTIONS] - Load an image from a tar archive or STDIN and shows image names or - IDs imported. +Load an image from a tar archive or STDIN - --help Print usage - -i, --input="" Read from a tar archive file, instead of STDIN. The tarball may be compressed with gzip, bzip, or xz - -q, --quiet Suppress the load progress bar but still outputs the imported images +Options: + --help Print usage + -i, --input string Read from tar archive file, instead of STDIN. + The tarball may be compressed with gzip, bzip, or xz + -q, --quiet Suppress the load output but still outputs the imported images +``` Loads a tarred repository from a file or the standard input stream. Restores both images and tags. diff --git a/docs/reference/commandline/login.md b/docs/reference/commandline/login.md index baff45f8c7..4c5670ea53 100644 --- a/docs/reference/commandline/login.md +++ b/docs/reference/commandline/login.md @@ -10,14 +10,17 @@ parent = "smn_cli" # login - Usage: docker login [OPTIONS] [SERVER] +```markdown +Usage: docker login [OPTIONS] [SERVER] - Log in to a Docker registry server, if no server is - specified "https://index.docker.io/v1/" is the default. +Log in to a Docker registry. +If no server is specified, the default is defined by the daemon. - --help Print usage - -p, --password="" Password - -u, --username="" Username +Options: + --help Print usage + -p, --password string Password + -u, --username string Username +``` If you want to login to a self-hosted registry you can specify this by adding the server name. diff --git a/docs/reference/commandline/logout.md b/docs/reference/commandline/logout.md index a3bb40c657..a073b34f88 100644 --- a/docs/reference/commandline/logout.md +++ b/docs/reference/commandline/logout.md @@ -10,12 +10,15 @@ parent = "smn_cli" # logout - Usage: docker logout [SERVER] +```markdown +Usage: docker logout [SERVER] - Log out from a Docker registry, if no server is - specified "https://index.docker.io/v1/" is the default. +Log out from a Docker registry. +If no server is specified, the default is defined by the daemon. - --help Print usage +Options: + --help Print usage +``` For example: diff --git a/docs/reference/commandline/logs.md b/docs/reference/commandline/logs.md index dd90c4dcc0..9074311405 100644 --- a/docs/reference/commandline/logs.md +++ b/docs/reference/commandline/logs.md @@ -10,16 +10,19 @@ parent = "smn_cli" # logs - Usage: docker logs [OPTIONS] CONTAINER +```markdown +Usage: docker logs [OPTIONS] CONTAINER - Fetch the logs of a container +Fetch the logs of a container - --details Show extra details provided to logs - -f, --follow Follow log output - --help Print usage - --since="" Show logs since timestamp - -t, --timestamps Show timestamps - --tail="all" Number of lines to show from the end of the logs +Options: + --details Show extra details provided to logs + -f, --follow Follow log output + --help Print usage + --since string Show logs since timestamp + --tail string Number of lines to show from the end of the logs (default "all") + -t, --timestamps Show timestamps +``` > **Note**: this command is available only for containers with `json-file` and > `journald` logging drivers. diff --git a/docs/reference/commandline/network_connect.md b/docs/reference/commandline/network_connect.md index c6a33ed15e..f60abe574a 100644 --- a/docs/reference/commandline/network_connect.md +++ b/docs/reference/commandline/network_connect.md @@ -10,16 +10,19 @@ parent = "smn_cli" # network connect - Usage: docker network connect [OPTIONS] NETWORK CONTAINER +```markdown +Usage: docker network connect [OPTIONS] NETWORK CONTAINER - Connect a container to a network +Connect a container to a network - --alias=[] Add network-scoped alias for the container - --help Print usage - --ip IPv4 Address - --ip6 IPv6 Address - --link=[] Add a link to another container - --link-local-ip=[] IPv4/IPv6 link-local addresses +Options: + --alias value Add network-scoped alias for the container (default []) + --help Print usage + --ip string IP Address + --ip6 string IPv6 Address + --link value Add link to another container (default []) + --link-local-ip value Add a link-local address for the container (default []) +``` Connects a container to a network. You can connect a container by name or by ID. Once connected, the container can communicate with other containers in diff --git a/docs/reference/commandline/network_disconnect.md b/docs/reference/commandline/network_disconnect.md index 10c4f16ea2..9d0c31580d 100644 --- a/docs/reference/commandline/network_disconnect.md +++ b/docs/reference/commandline/network_disconnect.md @@ -10,13 +10,15 @@ parent = "smn_cli" # network disconnect - Usage: docker network disconnect [OPTIONS] NETWORK CONTAINER +```markdown +Usage: docker network disconnect [OPTIONS] NETWORK CONTAINER +Disconnect a container from a network - Disconnects a container from a network - - -f, --force Force the container to disconnect from a network - --help Print usage +Options: + -f, --force Force the container to disconnect from a network + --help Print usage +``` Disconnects a container from a network. The container must be running to disconnect it from the network. diff --git a/docs/reference/commandline/network_inspect.md b/docs/reference/commandline/network_inspect.md index 251407e596..e72a5c793f 100644 --- a/docs/reference/commandline/network_inspect.md +++ b/docs/reference/commandline/network_inspect.md @@ -10,12 +10,15 @@ parent = "smn_cli" # network inspect - Usage: docker network inspect [OPTIONS] NETWORK [NETWORK..] +```markdown +Usage: docker network inspect [OPTIONS] NETWORK [NETWORK...] - Displays detailed information on a network +Display detailed information on one or more networks - -f, --format= Format the output using the given go template. - --help Print usage +Options: + -f, --format string Format the output using the given go template + --help Print usage +``` Returns information about one or more networks. By default, this command renders all results in a JSON object. For example, if you connect two containers to the default `bridge` network: diff --git a/docs/reference/commandline/network_ls.md b/docs/reference/commandline/network_ls.md index 181db08c44..49614bdaf4 100644 --- a/docs/reference/commandline/network_ls.md +++ b/docs/reference/commandline/network_ls.md @@ -10,13 +10,20 @@ parent = "smn_cli" # docker network ls - Usage: docker network ls [OPTIONS] +```markdown +Usage: docker network ls [OPTIONS] - List networks - -f, --filter=[] Filter output based on conditions provided - --help Print usage - --no-trunc Do not truncate the output - -q, --quiet Only display numeric IDs +List networks + +Aliases: + ls, list + +Options: + -f, --filter value Provide filter values (i.e. 'dangling=true') (default []) + --help Print usage + --no-trunc Do not truncate the output + -q, --quiet Only display volume names +``` Lists all the networks the Engine `daemon` knows about. This includes the networks that span across multiple hosts in a cluster, for example: diff --git a/docs/reference/commandline/network_rm.md b/docs/reference/commandline/network_rm.md index 0653458f9d..ce213b47fe 100644 --- a/docs/reference/commandline/network_rm.md +++ b/docs/reference/commandline/network_rm.md @@ -10,11 +10,17 @@ parent = "smn_cli" # network rm - Usage: docker network rm [OPTIONS] NETWORK [NETWORK...] +```markdown +Usage: docker network rm NETWORK [NETWORK]... - Deletes one or more networks +Remove a network - --help Print usage +Aliases: + rm, remove + +Options: + --help Print usage +``` Removes one or more networks by name or identifier. To remove a network, you must first disconnect any containers connected to it. diff --git a/docs/reference/commandline/node_accept.md b/docs/reference/commandline/node_accept.md index 21cb15fc36..73676c086c 100644 --- a/docs/reference/commandline/node_accept.md +++ b/docs/reference/commandline/node_accept.md @@ -10,9 +10,14 @@ parent = "smn_cli" # node accept - Usage: docker node accept NODE [NODE...] +```markdown +Usage: docker node accept NODE [NODE...] - Accept a node in the swarm +Accept a node in the swarm + +Options: + --help Print usage +``` Accept a node into the swarm. This command targets a docker engine that is a manager in the swarm cluster. diff --git a/docs/reference/commandline/node_demote.md b/docs/reference/commandline/node_demote.md index bf16b9c63b..5d765adfaf 100644 --- a/docs/reference/commandline/node_demote.md +++ b/docs/reference/commandline/node_demote.md @@ -10,9 +10,15 @@ parent = "smn_cli" # node demote - Usage: docker node demote NODE [NODE...] +```markdown +Usage: docker node demote NODE [NODE...] - Demote a node as manager in the swarm +Demote a node from manager in the swarm + +Options: + --help Print usage + +``` Demotes an existing manager so that it is no longer a manager. This command targets a docker engine that is a manager in the swarm cluster. diff --git a/docs/reference/commandline/node_inspect.md b/docs/reference/commandline/node_inspect.md index 7fb6f25a60..ae13168da8 100644 --- a/docs/reference/commandline/node_inspect.md +++ b/docs/reference/commandline/node_inspect.md @@ -12,14 +12,16 @@ parent = "smn_cli" # node inspect - Usage: docker node inspect [OPTIONS] self|NODE [NODE...] +```markdown +Usage: docker node inspect [OPTIONS] self|NODE [NODE...] - Display detailed information on one or more nodes +Display detailed information on one or more nodes - - -f, --format= Format the output using the given go template. - --help Print usage - -p, --pretty Print the information in a human friendly format. +Options: + -f, --format string Format the output using the given go template + --help Print usage + -p, --pretty Print the information in a human friendly format. +``` Returns information about a node. By default, this command renders all results in a JSON array. You can specify an alternate format to execute a diff --git a/docs/reference/commandline/node_ls.md b/docs/reference/commandline/node_ls.md index 7fa7700dc0..bf5f70df27 100644 --- a/docs/reference/commandline/node_ls.md +++ b/docs/reference/commandline/node_ls.md @@ -12,17 +12,19 @@ parent = "smn_cli" # node ls - Usage: docker node ls [OPTIONS] +```markdown +Usage: docker node ls [OPTIONS] - List nodes in the swarm +List nodes in the swarm - Aliases: - ls, list +Aliases: + ls, list - Options: - -f, --filter value Filter output based on conditions provided - --help Print usage - -q, --quiet Only display IDs +Options: + -f, --filter value Filter output based on conditions provided + --help Print usage + -q, --quiet Only display IDs +``` Lists all the nodes that the Docker Swarm manager knows about. You can filter using the `-f` or `--filter` flag. Refer to the [filtering](#filtering) section for more information about available filter options. diff --git a/docs/reference/commandline/node_promote.md b/docs/reference/commandline/node_promote.md index 06c76c2a90..884fee8fc9 100644 --- a/docs/reference/commandline/node_promote.md +++ b/docs/reference/commandline/node_promote.md @@ -10,9 +10,14 @@ parent = "smn_cli" # node promote - Usage: docker node promote NODE [NODE...] +```markdown +Usage: docker node promote NODE [NODE...] - Promote a node as manager in the swarm +Promote a node to a manager in the swarm + +Options: + --help Print usage +``` Promotes a node that is pending a promotion to manager. This command targets a docker engine that is a manager in the swarm cluster. diff --git a/docs/reference/commandline/node_rm.md b/docs/reference/commandline/node_rm.md index 6eb9a873cf..613cf4fbd1 100644 --- a/docs/reference/commandline/node_rm.md +++ b/docs/reference/commandline/node_rm.md @@ -12,17 +12,21 @@ parent = "smn_cli" # node rm - Usage: docker node rm NODE [NODE...] +```markdown +Usage: docker node rm NODE [NODE...] - Remove a node from the swarm +Remove a node from the swarm - Aliases: - rm, remove +Aliases: + rm, remove - Options: - --help Print usage +Options: + --help Print usage +``` + +Removes specified nodes from a swarm. Rejects nodes with `Pending` +membership from the swarm. -Removes nodes that are specified. Example output: diff --git a/docs/reference/commandline/node_tasks.md b/docs/reference/commandline/node_tasks.md index 84e8a9dad6..de84335e57 100644 --- a/docs/reference/commandline/node_tasks.md +++ b/docs/reference/commandline/node_tasks.md @@ -12,15 +12,17 @@ parent = "smn_cli" # node tasks - Usage: docker node tasks [OPTIONS] NODE +```markdown +Usage: docker node tasks [OPTIONS] self|NODE - List tasks running on a node +List tasks running on a node - Options: - -a, --all Display all instances - -f, --filter value Filter output based on conditions provided +Options: + -a, --all Display all instances + -f, --filter value Filter output based on conditions provided --help Print usage - -n, --no-resolve Do not map IDs to Names + -n, --no-resolve Do not map IDs to Names +``` Lists all the tasks on a Node that Docker knows about. You can filter using the `-f` or `--filter` flag. Refer to the [filtering](#filtering) section for more information about available filter options. diff --git a/docs/reference/commandline/node_update.md b/docs/reference/commandline/node_update.md index 8f005430a3..068958f6f0 100644 --- a/docs/reference/commandline/node_update.md +++ b/docs/reference/commandline/node_update.md @@ -12,16 +12,17 @@ parent = "smn_cli" ## update - Usage: docker node update [OPTIONS] Node +```markdown +Usage: docker node update [OPTIONS] NODE - Update a node +Update a node - Options: +Options: --availability string Availability of the node (active/pause/drain) --help Print usage --membership string Membership of the node (accepted/rejected) --role string Role of the node (worker/manager) - +``` ## Related information diff --git a/docs/reference/commandline/pause.md b/docs/reference/commandline/pause.md index 73d3c94935..629c6ed091 100644 --- a/docs/reference/commandline/pause.md +++ b/docs/reference/commandline/pause.md @@ -10,11 +10,14 @@ parent = "smn_cli" # pause - Usage: docker pause [OPTIONS] CONTAINER [CONTAINER...] +```markdown +Usage: docker pause CONTAINER [CONTAINER...] - Pause all processes within a container +Pause all processes within one or more containers - --help Print usage +Options: + --help Print usage +``` The `docker pause` command uses the cgroups freezer to suspend all processes in a container. Traditionally, when suspending a process the `SIGSTOP` signal is diff --git a/docs/reference/commandline/plugin_disable.md b/docs/reference/commandline/plugin_disable.md index dd5998e89f..2ddba071b4 100644 --- a/docs/reference/commandline/plugin_disable.md +++ b/docs/reference/commandline/plugin_disable.md @@ -11,11 +11,14 @@ parent = "smn_cli" # plugin disable (experimental) - Usage: docker plugin disable PLUGIN +```markdown +Usage: docker plugin disable PLUGIN - Disable a plugin +Disable a plugin - --help Print usage +Options: + --help Print usage +``` Disables a plugin. The plugin must be installed before it can be disabled, see [`docker plugin install`](plugin_install.md). diff --git a/docs/reference/commandline/plugin_enable.md b/docs/reference/commandline/plugin_enable.md index 323882325a..c7370e1818 100644 --- a/docs/reference/commandline/plugin_enable.md +++ b/docs/reference/commandline/plugin_enable.md @@ -11,11 +11,14 @@ parent = "smn_cli" # plugin enable (experimental) - Usage: docker plugin enable PLUGIN +```markdown +Usage: docker plugin enable PLUGIN - Enable a plugin +Enable a plugin - --help Print usage +Options: + --help Print usage +``` Enables a plugin. The plugin must be installed before it can be enabled, see [`docker plugin install`](plugin_install.md). diff --git a/docs/reference/commandline/plugin_inspect.md b/docs/reference/commandline/plugin_inspect.md index 67d63c236b..8131441a12 100644 --- a/docs/reference/commandline/plugin_inspect.md +++ b/docs/reference/commandline/plugin_inspect.md @@ -11,12 +11,14 @@ parent = "smn_cli" # plugin inspect (experimental) - Usage: docker plugin inspect PLUGIN +```markdown +Usage: docker plugin inspect PLUGIN - Return low-level information about a plugin - - --help Print usage +Inspect a plugin +Options: + --help Print usage +``` Returns information about a plugin. By default, this command renders all results in a JSON array. diff --git a/docs/reference/commandline/plugin_install.md b/docs/reference/commandline/plugin_install.md index 03d089584f..52f222c44c 100644 --- a/docs/reference/commandline/plugin_install.md +++ b/docs/reference/commandline/plugin_install.md @@ -11,11 +11,16 @@ parent = "smn_cli" # plugin install (experimental) - Usage: docker plugin install PLUGIN +```markdown +Usage: docker plugin install PLUGIN [OPTIONS] - Install a plugin +Install a plugin - --help Print usage +Options: + --disable do not enable the plugin on install + --grant-all-permissions grant all permissions necessary to run the plugin + --help Print usage +``` Installs and enables a plugin. Docker looks first for the plugin on your Docker host. If the plugin does not exist locally, then the plugin is pulled from diff --git a/docs/reference/commandline/plugin_ls.md b/docs/reference/commandline/plugin_ls.md index 624807aaad..31ccdb96c0 100644 --- a/docs/reference/commandline/plugin_ls.md +++ b/docs/reference/commandline/plugin_ls.md @@ -11,14 +11,17 @@ parent = "smn_cli" # plugin ls (experimental) - Usage: docker plugin ls +```markdown +Usage: docker plugin ls - List plugins +List plugins +Aliases: + ls, list + +Options: --help Print usage - - Aliases: - ls, list +``` Lists all the plugins that are currently installed. You can install plugins using the [`docker plugin install`](plugin_install.md) command. diff --git a/docs/reference/commandline/plugin_rm.md b/docs/reference/commandline/plugin_rm.md index 5f73b00fee..04dbc674cc 100644 --- a/docs/reference/commandline/plugin_rm.md +++ b/docs/reference/commandline/plugin_rm.md @@ -11,14 +11,17 @@ parent = "smn_cli" # plugin rm (experimental) - Usage: docker plugin rm PLUGIN +```markdown +Usage: docker plugin rm PLUGIN - Remove a plugin +Remove a plugin - --help Print usage +Aliases: + rm, remove - Aliases: - rm, remove +Options: + --help Print usage +``` Removes a plugin. You cannot remove a plugin if it is active, you must disable a plugin using the [`docker plugin disable`](plugin_disable.md) before removing diff --git a/docs/reference/commandline/port.md b/docs/reference/commandline/port.md index dbfae61039..e8da943c36 100644 --- a/docs/reference/commandline/port.md +++ b/docs/reference/commandline/port.md @@ -10,12 +10,14 @@ parent = "smn_cli" # port - Usage: docker port [OPTIONS] CONTAINER [PRIVATE_PORT[/PROTO]] +```markdown +Usage: docker port CONTAINER [PRIVATE_PORT[/PROTO]] - List port mappings for the CONTAINER, or lookup the public-facing port that is - NAT-ed to the PRIVATE_PORT +List port mappings or a specific mapping for the container - --help Print usage +Options: + --help Print usage +``` You can find out all the ports mapped by not specifying a `PRIVATE_PORT`, or just a specific mapping: diff --git a/docs/reference/commandline/ps.md b/docs/reference/commandline/ps.md index c661c653dc..63aaa56985 100644 --- a/docs/reference/commandline/ps.md +++ b/docs/reference/commandline/ps.md @@ -10,28 +10,31 @@ parent = "smn_cli" # ps - Usage: docker ps [OPTIONS] +```markdown +Usage: docker ps [OPTIONS] - List containers +List containers - -a, --all Show all containers (default shows just running) - -f, --filter=[] Filter output based on these conditions: - - exited= an exit code of - - label= or label== - - status=(created|restarting|running|paused|exited) - - name= a container's name - - id= a container's ID - - before=(|) - - since=(|) - - ancestor=([:tag]||) - containers created from an image or a descendant. - - volume=(|) - --format=[] Pretty-print containers using a Go template - --help Print usage - -l, --latest Show the latest created container (includes all states) - -n=-1 Show n last created containers (includes all states) - --no-trunc Don't truncate output - -q, --quiet Only display numeric IDs - -s, --size Display total file sizes +Options: + -a, --all Show all containers (default shows just running) + -f, --filter value Filter output based on conditions provided (default []) + - exited= an exit code of + - label= or label== + - status=(created|restarting|running|paused|exited) + - name= a container's name + - id= a container's ID + - before=(|) + - since=(|) + - ancestor=([:tag]||) + containers created from an image or a descendant. + --format string Pretty-print containers using a Go template + --help Print usage + -n, --last int Show n last created containers (includes all states) (default -1) + -l, --latest Show the latest created container (includes all states) + --no-trunc Don't truncate output + -q, --quiet Only display numeric IDs + -s, --size Display total file sizes +``` Running `docker ps --no-trunc` showing 2 linked containers. diff --git a/docs/reference/commandline/pull.md b/docs/reference/commandline/pull.md index 01abc9590c..f10c134863 100644 --- a/docs/reference/commandline/pull.md +++ b/docs/reference/commandline/pull.md @@ -10,13 +10,16 @@ parent = "smn_cli" # pull - Usage: docker pull [OPTIONS] NAME[:TAG] | [REGISTRY_HOST[:REGISTRY_PORT]/]NAME[:TAG] +```markdown +Usage: docker pull [OPTIONS] NAME[:TAG|@DIGEST] - Pull an image or a repository from the registry +Pull an image or a repository from a registry - -a, --all-tags Download all tagged images in the repository - --disable-content-trust=true Skip image verification - --help Print usage +Options: + -a, --all-tags Download all tagged images in the repository + --disable-content-trust Skip image verification (default true) + --help Print usage +``` Most of your images will be created on top of a base image from the [Docker Hub](https://hub.docker.com) registry. diff --git a/docs/reference/commandline/push.md b/docs/reference/commandline/push.md index 1e617865df..42601ed1bb 100644 --- a/docs/reference/commandline/push.md +++ b/docs/reference/commandline/push.md @@ -10,12 +10,15 @@ parent = "smn_cli" # push - Usage: docker push [OPTIONS] NAME[:TAG] +```markdown +Usage: docker push [OPTIONS] NAME[:TAG] - Push an image or a repository to the registry +Push an image or a repository to a registry - --disable-content-trust=true Skip image signing - --help Print usage +Options: + --disable-content-trust Skip image verification (default true) + --help Print usage +``` Use `docker push` to share your images to the [Docker Hub](https://hub.docker.com) registry or to a self-hosted one. diff --git a/docs/reference/commandline/rename.md b/docs/reference/commandline/rename.md index 3e2b370387..11bf5d0a14 100644 --- a/docs/reference/commandline/rename.md +++ b/docs/reference/commandline/rename.md @@ -10,10 +10,13 @@ parent = "smn_cli" # rename - Usage: docker rename [OPTIONS] OLD_NAME NEW_NAME +```markdown +Usage: docker rename OLD_NAME NEW_NAME - Rename a container +Rename a container - --help Print usage +Options: + --help Print usage +``` The `docker rename` command allows the container to be renamed to a different name. diff --git a/docs/reference/commandline/restart.md b/docs/reference/commandline/restart.md index 5e6633c8cf..661e16d4de 100644 --- a/docs/reference/commandline/restart.md +++ b/docs/reference/commandline/restart.md @@ -10,9 +10,12 @@ parent = "smn_cli" # restart - Usage: docker restart [OPTIONS] CONTAINER [CONTAINER...] +```markdown +Usage: docker restart [OPTIONS] CONTAINER [CONTAINER...] - Restart a container +Restart a container - --help Print usage - -t, --time=10 Seconds to wait for stop before killing the container +Options: + --help Print usage + -t, --time int Seconds to wait for stop before killing the container (default 10) +``` diff --git a/docs/reference/commandline/rm.md b/docs/reference/commandline/rm.md index bf615b55b8..319ef4dbbc 100644 --- a/docs/reference/commandline/rm.md +++ b/docs/reference/commandline/rm.md @@ -10,14 +10,17 @@ parent = "smn_cli" # rm - Usage: docker rm [OPTIONS] CONTAINER [CONTAINER...] +```markdown +Usage: docker rm [OPTIONS] CONTAINER [CONTAINER...] - Remove one or more containers +Remove one or more containers - -f, --force Force the removal of a running container (uses SIGKILL) - --help Print usage - -l, --link Remove the specified link - -v, --volumes Remove the volumes associated with the container +Options: + -f, --force Force the removal of a running container (uses SIGKILL) + --help Print usage + -l, --link Remove the specified link + -v, --volumes Remove the volumes associated with the container +``` ## Examples diff --git a/docs/reference/commandline/rmi.md b/docs/reference/commandline/rmi.md index f02734e8b4..328d9fe140 100644 --- a/docs/reference/commandline/rmi.md +++ b/docs/reference/commandline/rmi.md @@ -10,13 +10,16 @@ parent = "smn_cli" # rmi - Usage: docker rmi [OPTIONS] IMAGE [IMAGE...] +```markdown +Usage: docker rmi [OPTIONS] IMAGE [IMAGE...] - Remove one or more images +Remove one or more images - -f, --force Force removal of the image - --help Print usage - --no-prune Do not delete untagged parents +Options: + -f, --force Force removal of the image + --help Print usage + --no-prune Do not delete untagged parents +``` You can remove an image using its short or long ID, its tag, or its digest. If an image has one or more tag referencing it, you must remove all of them before diff --git a/docs/reference/commandline/run.md b/docs/reference/commandline/run.md index 84ab8890c6..d454a6183a 100644 --- a/docs/reference/commandline/run.md +++ b/docs/reference/commandline/run.md @@ -10,109 +10,120 @@ parent = "smn_cli" # run - Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...] +```markdown +Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...] - Run a command in a new container +Run a command in a new container - -a, --attach=[] Attach to STDIN, STDOUT or STDERR - --add-host=[] Add a custom host-to-IP mapping (host:ip) - --blkio-weight=0 Block IO weight (relative weight) - --blkio-weight-device=[] Block IO weight (relative device weight, format: `DEVICE_NAME:WEIGHT`) - --cpu-shares=0 CPU shares (relative weight) - --cap-add=[] Add Linux capabilities - --cap-drop=[] Drop Linux capabilities - --cgroup-parent="" Optional parent cgroup for the container - --cidfile="" Write the container ID to the file - --cpu-percent=0 Limit percentage of CPU available for execution by the container. Windows daemon only. - --cpu-period=0 Limit CPU CFS (Completely Fair Scheduler) period - --cpu-quota=0 Limit CPU CFS (Completely Fair Scheduler) quota - --cpuset-cpus="" CPUs in which to allow execution (0-3, 0,1) - --cpuset-mems="" Memory nodes (MEMs) in which to allow execution (0-3, 0,1) - -d, --detach Run container in background and print container ID - --detach-keys Specify the escape key sequence used to detach a container - --device=[] Add a host device to the container - --device-read-bps=[] Limit read rate (bytes per second) from a device (e.g., --device-read-bps=/dev/sda:1mb) - --device-read-iops=[] Limit read rate (IO per second) from a device (e.g., --device-read-iops=/dev/sda:1000) - --device-write-bps=[] Limit write rate (bytes per second) to a device (e.g., --device-write-bps=/dev/sda:1mb) - --device-write-iops=[] Limit write rate (IO per second) to a device (e.g., --device-write-bps=/dev/sda:1000) - --disable-content-trust=true Skip image verification - --dns=[] Set custom DNS servers - --dns-opt=[] Set custom DNS options - --dns-search=[] Set custom DNS search domains - -e, --env=[] Set environment variables - --entrypoint="" Overwrite the default ENTRYPOINT of the image - --env-file=[] Read in a file of environment variables - --expose=[] Expose a port or a range of ports - --group-add=[] Add additional groups to run as - -h, --hostname="" Container host name +Options: + --add-host value Add a custom host-to-IP mapping (host:ip) (default []) + -a, --attach value Attach to STDIN, STDOUT or STDERR (default []) + --blkio-weight value Block IO (relative weight), between 10 and 1000 + --blkio-weight-device value Block IO weight (relative device weight) (default []) + --cap-add value Add Linux capabilities (default []) + --cap-drop value Drop Linux capabilities (default []) + --cgroup-parent string Optional parent cgroup for the container + --cidfile string Write the container ID to the file + --cpu-percent int CPU percent (Windows only) + --cpu-period int Limit CPU CFS (Completely Fair Scheduler) period + --cpu-quota int Limit CPU CFS (Completely Fair Scheduler) quota + -c, --cpu-shares int 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) + -d, --detach Run container in background and print container ID + --detach-keys string Override the key sequence for detaching a container + --device value Add a host device to the container (default []) + --device-read-bps value Limit read rate (bytes per second) from a device (default []) + --device-read-iops value Limit read rate (IO per second) from a device (default []) + --device-write-bps value Limit write rate (bytes per second) to a device (default []) + --device-write-iops value Limit write rate (IO per second) to a device (default []) + --disable-content-trust Skip image verification (default true) + --dns value Set custom DNS servers (default []) + --dns-opt value Set DNS options (default []) + --dns-search value Set custom DNS search domains (default []) + --entrypoint string Overwrite the default ENTRYPOINT of the image + -e, --env value Set environment variables (default []) + --env-file value Read in a file of environment variables (default []) + --expose value Expose a port or a range of ports (default []) + --group-add value Add additional groups to join (default []) + --health-cmd string Command to run to check health + --health-interval duration Time between running the check + --health-retries int Consecutive failures needed to report unhealthy + --health-timeout duration Maximum time to allow one check to run --help Print usage - -i, --interactive Keep STDIN open even if not attached - --ip="" Container IPv4 address (e.g. 172.30.100.104) - --ip6="" Container IPv6 address (e.g. 2001:db8::33) - --ipc="" IPC namespace to use - --isolation="" Container isolation technology - --kernel-memory="" Kernel memory limit - -l, --label=[] Set metadata on the container (e.g., --label=com.example.key=value) - --label-file=[] Read in a file of labels (EOL delimited) - --link=[] Add link to another container - --link-local-ip=[] Container IPv4/IPv6 link-local addresses (e.g. 169.254.0.77, fe80::77) - --log-driver="" Logging driver for container - --log-opt=[] Log driver specific options - -m, --memory="" Memory limit - --mac-address="" Container MAC address (e.g. 92:d0:c6:0a:29:33) - --io-maxbandwidth="" Maximum IO bandwidth limit for the system drive + -h, --hostname string Container host name + -i, --interactive Keep STDIN open even if not attached + --io-maxbandwidth string Maximum IO bandwidth limit for the system drive (Windows only) (Windows only). The format is ``. Unit is optional and can be `b` (bytes per second), `k` (kilobytes per second), `m` (megabytes per second), or `g` (gigabytes per second). If you omit the unit, the system uses bytes per second. --io-maxbandwidth and --io-maxiops are mutually exclusive options. - --io-maxiops=0 Maximum IO per second limit for the system drive (Windows only). - --io-maxbandwidth and --io-maxiops are mutually exclusive options. - --memory-reservation="" Memory soft limit - --memory-swap="" A positive integer equal to memory plus swap. Specify -1 to enable unlimited swap. - --memory-swappiness="" Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. - --name="" Assign a name to the container - --net="bridge" Connect a container to a network + --io-maxiops uint Maximum IOps limit for the system drive (Windows only) + --ip string Container IPv4 address (e.g. 172.30.100.104) + --ip6 string Container IPv6 address (e.g. 2001:db8::33) + --ipc string IPC namespace to use + --isolation string Container isolation technology + --kernel-memory string Kernel memory limit + -l, --label value Set meta data on a container (default []) + --label-file value Read in a line delimited file of labels (default []) + --link value Add link to another container (default []) + --link-local-ip value Container IPv4/IPv6 link-local addresses (default []) + --log-driver string Logging driver for container + --log-opt value Log driver options (default []) + --mac-address string Container MAC address (e.g. 92:d0:c6:0a:29:33) + -m, --memory string Memory limit + --memory-reservation string Memory soft limit + --memory-swap string Swap limit equal to memory plus swap: '-1' to enable unlimited swap + --memory-swappiness int Tune container memory swappiness (0 to 100) (default -1). + --name string Assign a name to the container + --net string Connect a container to a network (default "default") 'bridge': create a network stack on the default Docker bridge 'none': no networking 'container:': reuse another container's network stack 'host': use the Docker host network stack '|': connect to a user-defined network - --net-alias=[] Add network-scoped alias for the container - --oom-kill-disable Whether to disable OOM Killer for the container or not - --oom-score-adj=0 Tune the host's OOM preferences for containers (accepts -1000 to 1000) - -P, --publish-all Publish all exposed ports to random ports - -p, --publish=[] Publish a container's port(s) to the host - --pid="" PID namespace to use - --pids-limit=-1 Tune container pids limit (set -1 for unlimited), kernel >= 4.3 + --net-alias value Add network-scoped alias for the container (default []) + --no-healthcheck Disable any container-specified HEALTHCHECK + --oom-kill-disable Disable OOM Killer + --oom-score-adj int Tune host's OOM preferences (-1000 to 1000) + --pid string PID namespace to use + --pids-limit int Tune container pids limit (set -1 for unlimited) --privileged Give extended privileges to this container + -p, --publish value Publish a container's port(s) to the host (default []) + -P, --publish-all Publish all exposed ports to random ports --read-only Mount the container's root filesystem as read only - --restart="no" Restart policy (no, on-failure[:max-retry], always, unless-stopped) + --restart string Restart policy to apply when a container exits (default "no") + Possible values are : no, on-failuer[:max-retry], always, unless-stopped --rm Automatically remove the container when it exits - --runtime="" Name of the runtime to be used for that container - --shm-size=[] Size of `/dev/shm`. The format is ``. `number` must be greater than `0`. Unit is optional and can be `b` (bytes), `k` (kilobytes), `m` (megabytes), or `g` (gigabytes). If you omit the unit, the system uses bytes. If you omit the size entirely, the system uses `64m`. - --security-opt=[] Security Options - --sig-proxy=true Proxy received signals to the process - --stop-signal="SIGTERM" Signal to stop a container - --storage-opt=[] Set storage driver options per container - --sysctl[=*[]*]] Configure namespaced kernel parameters at runtime - -t, --tty Allocate a pseudo-TTY - -u, --user="" Username or UID (format: [:]) - --userns="" Container user namespace + --runtime string Runtime to use for this container + --security-opt value Security Options (default []) + --shm-size string Size of /dev/shm, default value is 64MB. + The format is ``. `number` must be greater than `0`. + Unit is optional and can be `b` (bytes), `k` (kilobytes), `m` (megabytes), + or `g` (gigabytes). If you omit the unit, the system uses bytes. + --sig-proxy Proxy received signals to the process (default true) + --stop-signal string Signal to stop a container, SIGTERM by default (default "SIGTERM") + --storage-opt value Set storage driver options per container (default []) + --sysctl value Sysctl options (default map[]) + --tmpfs value Mount a tmpfs directory (default []) + -t, --tty Allocate a pseudo-TTY + --ulimit value Ulimit options (default []) + -u, --user string Username or UID (format: [:]) + --userns string User namespace to use 'host': Use the Docker host user namespace '': Use the Docker daemon user namespace specified by `--userns-remap` option. - --ulimit=[] Ulimit options - --uts="" UTS namespace to use - -v, --volume=[host-src:]container-dest[:] - Bind mount a volume. The comma-delimited + --uts string UTS namespace to use + -v, --volume value Bind mount a volume (default []). The comma-delimited `options` are [rw|ro], [z|Z], [[r]shared|[r]slave|[r]private], and [nocopy]. The 'host-src' is an absolute path or a name value. - --volume-driver="" Container's volume driver - --volumes-from=[] Mount volumes from the specified container(s) - -w, --workdir="" Working directory inside the container + --volume-driver string Optional volume driver for the container + --volumes-from value Mount volumes from the specified container(s) (default []) + -w, --workdir string Working directory inside the container +``` The `docker run` command first `creates` a writeable container layer over the specified image, and then `starts` it using the specified command. That is, diff --git a/docs/reference/commandline/save.md b/docs/reference/commandline/save.md index 23fc671210..f7d1fdedcb 100644 --- a/docs/reference/commandline/save.md +++ b/docs/reference/commandline/save.md @@ -10,12 +10,15 @@ parent = "smn_cli" # save - Usage: docker save [OPTIONS] IMAGE [IMAGE...] +```markdown +Usage: docker save [OPTIONS] IMAGE [IMAGE...] - Save one or more images to a tar archive (streamed to STDOUT by default) +Save one or more images to a tar archive (streamed to STDOUT by default) - --help Print usage - -o, --output="" Write to a file, instead of STDOUT +Options: + --help Print usage + -o, --output string Write to a file, instead of STDOUT +``` Produces a tarred repository to the standard output stream. Contains all parent layers, and all tags + versions, or specified `repo:tag`, for diff --git a/docs/reference/commandline/search.md b/docs/reference/commandline/search.md index 672ff7554a..988db8bf1f 100644 --- a/docs/reference/commandline/search.md +++ b/docs/reference/commandline/search.md @@ -10,17 +10,20 @@ parent = "smn_cli" # search - Usage: docker search [OPTIONS] TERM +```markdown +Usage: docker search [OPTIONS] TERM - Search the Docker Hub for images +Search the Docker Hub for images - --filter=[] Filter output based on these conditions: - - is-automated=(true|false) - - is-official=(true|false) - - stars= - image has at least 'number' stars - --help Print usage - --limit=25 Maximum returned search results - --no-trunc Don't truncate output +Options: + -f, --filter value Filter output based on conditions provided (default []) + - is-automated=(true|false) + - is-official=(true|false) + - stars= - image has at least 'number' stars + --help Print usage + --limit int Max number of search results (default 25) + --no-trunc Don't truncate output +``` Search [Docker Hub](https://hub.docker.com) for images diff --git a/docs/reference/commandline/service_create.md b/docs/reference/commandline/service_create.md index e69581bd9f..da6bc4295a 100644 --- a/docs/reference/commandline/service_create.md +++ b/docs/reference/commandline/service_create.md @@ -14,7 +14,7 @@ parent = "smn_cli" # service create ```Markdown -Usage: docker service create [OPTIONS] IMAGE [COMMAND] [ARG...] +Usage: docker service create [OPTIONS] IMAGE [COMMAND] [ARG...] Create a new service @@ -31,6 +31,7 @@ Options: --name string Service name --network value Network attachments (default []) -p, --publish value Publish a port as a node port (default []) + --registry-auth Send registry authentication details to Swarm agents --replicas value Number of tasks (default none) --reserve-cpu value Reserve CPUs (default 0.000) --reserve-memory value Reserve Memory (default 0 B) diff --git a/docs/reference/commandline/service_inspect.md b/docs/reference/commandline/service_inspect.md index 13116d83de..5f4b09d28d 100644 --- a/docs/reference/commandline/service_inspect.md +++ b/docs/reference/commandline/service_inspect.md @@ -13,7 +13,7 @@ parent = "smn_cli" # service inspect ```Markdown -Usage: docker service inspect [OPTIONS] SERVICE [SERVICE...] +Usage: docker service inspect [OPTIONS] SERVICE [SERVICE...] Display detailed information on one or more services diff --git a/docs/reference/commandline/service_ls.md b/docs/reference/commandline/service_ls.md index 543c1d6e71..14cf2b43e4 100644 --- a/docs/reference/commandline/service_ls.md +++ b/docs/reference/commandline/service_ls.md @@ -13,8 +13,6 @@ parent = "smn_cli" # service ls ```Markdown -docker service ls --help - Usage: docker service ls [OPTIONS] List services diff --git a/docs/reference/commandline/service_scale.md b/docs/reference/commandline/service_scale.md index 272dcc849a..9a6721b016 100644 --- a/docs/reference/commandline/service_scale.md +++ b/docs/reference/commandline/service_scale.md @@ -12,13 +12,14 @@ parent = "smn_cli" # service scale - Usage: docker service scale SERVICE=REPLICAS [SERVICE=REPLICAS...] +```markdown +Usage: docker service scale SERVICE=REPLICAS [SERVICE=REPLICAS...] - Scale one or multiple services - - Options: - --help Print usage +Scale one or multiple services +Options: + --help Print usage +``` ## Examples diff --git a/docs/reference/commandline/service_tasks.md b/docs/reference/commandline/service_tasks.md index f3c2869542..cceec92039 100644 --- a/docs/reference/commandline/service_tasks.md +++ b/docs/reference/commandline/service_tasks.md @@ -54,8 +54,8 @@ bk658fpbex0d57cqcwoe3jthu redis.2 redis redis:3.0.6 Running 9 seconds Ru The filtering flag (`-f` or `--filter`) format is a `key=value` pair. If there is more than one filter, then pass multiple flags (e.g. `--filter "foo=bar" --filter "bif=baz"`). -Multiple filter flags are combined as an `OR` filter. For example, -`-f type=custom -f type=builtin` returns both `custom` and `builtin` networks. +Multiple filter flags are combined as an `OR` filter. For example, +`-f name=redis.1 -f name=redis.7` returns both `redis.1` and `redis.7` tasks. The currently supported filters are: diff --git a/docs/reference/commandline/service_update.md b/docs/reference/commandline/service_update.md index 6390ebb911..131b37b96e 100644 --- a/docs/reference/commandline/service_update.md +++ b/docs/reference/commandline/service_update.md @@ -13,7 +13,7 @@ parent = "smn_cli" # service update ```Markdown -Usage: docker service update [OPTIONS] SERVICE +Usage: docker service update [OPTIONS] SERVICE Update a service @@ -28,11 +28,11 @@ Options: -l, --label value Service labels (default []) --limit-cpu value Limit CPUs (default 0.000) --limit-memory value Limit Memory (default 0 B) - --mode string Service mode (replicated or global) (default "replicated") -m, --mount value Attach a mount to the service --name string Service name --network value Network attachments (default []) -p, --publish value Publish a port as a node port (default []) + --registry-auth Send registry authentication details to Swarm agents --replicas value Number of tasks (default none) --reserve-cpu value Reserve CPUs (default 0.000) --reserve-memory value Reserve Memory (default 0 B) diff --git a/docs/reference/commandline/start.md b/docs/reference/commandline/start.md index 156a2aae08..72ff7e1002 100644 --- a/docs/reference/commandline/start.md +++ b/docs/reference/commandline/start.md @@ -10,11 +10,14 @@ parent = "smn_cli" # start - Usage: docker start [OPTIONS] CONTAINER [CONTAINER...] +```markdown +Usage: docker start [OPTIONS] CONTAINER [CONTAINER...] - Start one or more containers +Start one or more stopped containers - -a, --attach Attach STDOUT/STDERR and forward signals - --detach-keys Specify the escape key sequence used to detach a container - --help Print usage - -i, --interactive Attach container's STDIN +Options: + -a, --attach Attach STDOUT/STDERR and forward signals + --detach-keys string Override the key sequence for detaching a container + --help Print usage + -i, --interactive Attach container's STDIN +``` diff --git a/docs/reference/commandline/stats.md b/docs/reference/commandline/stats.md index d46a94e3a2..3e1a5c4ccc 100644 --- a/docs/reference/commandline/stats.md +++ b/docs/reference/commandline/stats.md @@ -10,13 +10,16 @@ parent = "smn_cli" # stats - Usage: docker stats [OPTIONS] [CONTAINER...] +```markdown +Usage: docker stats [OPTIONS] [CONTAINER...] - Display a live stream of one or more containers' resource usage statistics +Display a live stream of container(s) resource usage statistics - -a, --all Show all containers (default shows just running) - --help Print usage - --no-stream Disable streaming stats and only pull the first result +Options: + -a, --all Show all containers (default shows just running) + --help Print usage + --no-stream Disable streaming stats and only pull the first result +``` The `docker stats` command returns a live data stream for running containers. To limit data to one or more specific containers, specify a list of container names or ids separated by a space. You can specify a stopped container but stopped containers do not return any data. diff --git a/docs/reference/commandline/stop.md b/docs/reference/commandline/stop.md index 1fb376eaf7..662255846f 100644 --- a/docs/reference/commandline/stop.md +++ b/docs/reference/commandline/stop.md @@ -10,13 +10,15 @@ parent = "smn_cli" # stop - Usage: docker stop [OPTIONS] CONTAINER [CONTAINER...] +```markdown +Usage: docker stop [OPTIONS] CONTAINER [CONTAINER...] - Stop a container by sending SIGTERM and then SIGKILL after a - grace period +Stop one or more running containers - --help Print usage - -t, --time=10 Seconds to wait for stop before killing it +Options: + --help Print usage + -t, --time int Seconds to wait for stop before killing it (default 10) +``` The main process inside the container will receive `SIGTERM`, and after a grace period, `SIGKILL`. diff --git a/docs/reference/commandline/swarm_init.md b/docs/reference/commandline/swarm_init.md index 5dfc07d6ad..1de9e2cf27 100644 --- a/docs/reference/commandline/swarm_init.md +++ b/docs/reference/commandline/swarm_init.md @@ -12,17 +12,22 @@ parent = "smn_cli" # swarm init - Usage: docker swarm init [OPTIONS] +```markdown +Usage: docker swarm init [OPTIONS] - Initialize a Swarm. +Initialize a Swarm - Options: - --auto-accept value Acceptance policy (default [worker,manager]) - --external-ca value Specifications of one or more certificate signing endpoints - --force-new-cluster Force create a new cluster from current state. - --help Print usage - --listen-addr value Listen address (default 0.0.0.0:2377) - --secret string Set secret value needed to accept nodes into cluster +Options: + --auto-accept value Auto acceptance policy (worker, manager or none) + --cert-expiry duration Validity period for node certificates (default 2160h0m0s) + --dispatcher-heartbeat duration Dispatcher heartbeat period (default 5s) + --external-ca value Specifications of one or more certificate signing endpoints + --force-new-cluster Force create a new cluster from current state. + --help Print usage + --listen-addr value Listen address (default 0.0.0.0:2377) + --secret string Set secret value needed to accept nodes into cluster + --task-history-limit int Task history retention limit (default 10) +``` Initialize a Swarm cluster. The docker engine targeted by this command becomes a manager in the newly created one node Swarm cluster. @@ -62,6 +67,15 @@ For example, the following initializes a cluster with auto-acceptance of workers $ docker swarm init --listen-addr 192.168.99.121:2377 --auto-accept worker ``` +### `--cert-expiry` + +This flag sets the validity period for node certificates. + +### `--dispatcher-heartbeat` + +This flags sets the frequency with which nodes are told to use as a +period to report their health. + ### `--external-ca value` This flag sets up the swarm to use an external CA to issue node certificates. The value takes @@ -81,6 +95,10 @@ The node listens for inbound Swarm manager traffic on this IP:PORT Secret value needed to accept nodes into the Swarm +### `--task-history-limit` + +This flag sets up task history retention limit. + ## Related information * [swarm join](swarm_join.md) diff --git a/docs/reference/commandline/swarm_join.md b/docs/reference/commandline/swarm_join.md index c1955c513c..6d99a406e7 100644 --- a/docs/reference/commandline/swarm_join.md +++ b/docs/reference/commandline/swarm_join.md @@ -12,15 +12,18 @@ parent = "smn_cli" # swarm join - Usage: docker swarm join [OPTIONS] HOST:PORT +```markdown +Usage: docker swarm join [OPTIONS] HOST:PORT - Join a Swarm as a node and/or manager. +Join a Swarm as a node and/or manager - Options: - --help Print usage - --listen-addr value Listen address (default 0.0.0.0:2377) - --manager Try joining as a manager. - --secret string Secret for node acceptance +Options: + --ca-hash string Hash of the Root Certificate Authority certificate used for trusted join + --help Print usage + --listen-addr value Listen address (default 0.0.0.0:2377) + --manager Try joining as a manager. + --secret string Secret for node acceptance +``` Join a node to a Swarm cluster. If the `--manager` flag is specified, the docker engine targeted by this command becomes a `manager`. If it is not specified, it becomes a `worker`. @@ -48,14 +51,18 @@ dkp8vy1dq1kxleu9g4u78tlag worker1 Accepted Ready Active Reachab dvfxp4zseq4s0rih1selh0d20 * manager1 Accepted Ready Active Reachable Yes ``` -### `--manager` +### `--ca-hash` -Joins the node as a manager +Hash of the Root Certificate Authority certificate used for trusted join. ### `--listen-addr value` The node listens for inbound Swarm manager traffic on this IP:PORT +### `--manager` + +Joins the node as a manager + ### `--secret string` Secret value required for nodes to join the swarm diff --git a/docs/reference/commandline/swarm_leave.md b/docs/reference/commandline/swarm_leave.md index bf75adadb4..1fdbc38fc5 100644 --- a/docs/reference/commandline/swarm_leave.md +++ b/docs/reference/commandline/swarm_leave.md @@ -12,12 +12,15 @@ parent = "smn_cli" # swarm leave - Usage: docker swarm leave +```markdown +Usage: docker swarm leave [OPTIONS] - Leave a Swarm swarm. +Leave a Swarm - Options: - --help Print usage +Options: + --force Force leave ignoring warnings. + --help Print usage +``` This command causes the node to leave the swarm. diff --git a/docs/reference/commandline/swarm_update.md b/docs/reference/commandline/swarm_update.md index 81f14d4bfb..6173923be3 100644 --- a/docs/reference/commandline/swarm_update.md +++ b/docs/reference/commandline/swarm_update.md @@ -12,17 +12,20 @@ parent = "smn_cli" # swarm update - Usage: docker swarm update [OPTIONS] +```markdown +Usage: docker swarm update [OPTIONS] - Update the Swarm. +Update the Swarm - Options: - --auto-accept value Auto acceptance policy (worker, manager or none) - --external-ca value Specifications of one or more certificate signing endpoints - --dispatcher-heartbeat duration Dispatcher heartbeat period (default 5s) - --help Print usage - --secret string Set secret value needed to accept nodes into cluster - --task-history-limit int Task history retention limit (default 10) +Options: + --auto-accept value Auto acceptance policy (worker, manager or none) + --cert-expiry duration Validity period for node certificates (default 2160h0m0s) + --dispatcher-heartbeat duration Dispatcher heartbeat period (default 5s) + --external-ca value Specifications of one or more certificate signing endpoints + --help Print usage + --secret string Set secret value needed to accept nodes into cluster + --task-history-limit int Task history retention limit (default 10) +``` Updates a Swarm cluster with new parameter values. This command must target a manager node. diff --git a/docs/reference/commandline/tag.md b/docs/reference/commandline/tag.md index 47cc58c4e5..60692958f1 100644 --- a/docs/reference/commandline/tag.md +++ b/docs/reference/commandline/tag.md @@ -10,11 +10,14 @@ parent = "smn_cli" # tag - Usage: docker tag [OPTIONS] NAME[:TAG] NAME[:TAG] +```markdown +Usage: docker tag IMAGE[:TAG] IMAGE[:TAG] - Tag an image into a repository +Tag an image into a repository - --help Print usage +Options: + --help Print usage +``` An image name is made up of slash-separated name components, optionally prefixed by a registry hostname. The hostname must comply with standard DNS rules, but diff --git a/docs/reference/commandline/top.md b/docs/reference/commandline/top.md index 2bff2fdb47..291f96ce09 100644 --- a/docs/reference/commandline/top.md +++ b/docs/reference/commandline/top.md @@ -10,8 +10,11 @@ parent = "smn_cli" # top - Usage: docker top [OPTIONS] CONTAINER [ps OPTIONS] +```markdown +Usage: docker top CONTAINER [ps OPTIONS] - Display the running processes of a container +Display the running processes of a container - --help Print usage +Options: + --help Print usage +``` diff --git a/docs/reference/commandline/unpause.md b/docs/reference/commandline/unpause.md index c5920f435c..e5c9d506e0 100644 --- a/docs/reference/commandline/unpause.md +++ b/docs/reference/commandline/unpause.md @@ -10,11 +10,14 @@ parent = "smn_cli" # unpause - Usage: docker unpause [OPTIONS] CONTAINER [CONTAINER...] +```markdown +Usage: docker unpause CONTAINER [CONTAINER...] - Unpause all processes within a container +Unpause all processes within one or more containers - --help Print usage +Options: + --help Print usage +``` The `docker unpause` command uses the cgroups freezer to un-suspend all processes in a container. diff --git a/docs/reference/commandline/update.md b/docs/reference/commandline/update.md index 24fb1f290d..4ad4dc9e62 100644 --- a/docs/reference/commandline/update.md +++ b/docs/reference/commandline/update.md @@ -10,22 +10,25 @@ parent = "smn_cli" ## update - Usage: docker update [OPTIONS] CONTAINER [CONTAINER...] +```markdown +Usage: docker update [OPTIONS] CONTAINER [CONTAINER...] - Update configuration of one or more containers +Update configuration of one or more containers - --help=false Print usage - --blkio-weight=0 Block IO (relative weight), between 10 and 1000 - --cpu-shares=0 CPU shares (relative weight) - --cpu-period=0 Limit the CPU CFS (Completely Fair Scheduler) period - --cpu-quota=0 Limit the CPU CFS (Completely Fair Scheduler) quota - --cpuset-cpus="" CPUs in which to allow execution (0-3, 0,1) - --cpuset-mems="" Memory nodes (MEMs) in which to allow execution (0-3, 0,1) - -m, --memory="" Memory limit - --memory-reservation="" Memory soft limit - --memory-swap="" A positive integer equal to memory plus swap. Specify -1 to enable unlimited swap - --kernel-memory="" Kernel memory limit: container must be stopped - --restart Restart policy to apply when a container exits +Options: + --blkio-weight value Block IO (relative weight), between 10 and 1000 + --cpu-period int Limit CPU CFS (Completely Fair Scheduler) period + --cpu-quota int Limit CPU CFS (Completely Fair Scheduler) quota + -c, --cpu-shares int 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) + --help Print usage + --kernel-memory string Kernel memory limit + -m, --memory string Memory limit + --memory-reservation string Memory soft limit + --memory-swap string Swap limit equal to memory plus swap: '-1' to enable unlimited swap + --restart string Restart policy to apply when a container exits +``` The `docker update` command dynamically updates container configuration. You can use this command to prevent containers from consuming too many resources diff --git a/docs/reference/commandline/version.md b/docs/reference/commandline/version.md index 14fac17e29..e650e41a2d 100644 --- a/docs/reference/commandline/version.md +++ b/docs/reference/commandline/version.md @@ -10,12 +10,15 @@ parent = "smn_cli" # version - Usage: docker version [OPTIONS] +```markdown +Usage: docker version [OPTIONS] - Show the Docker version information. +Show the Docker version information - -f, --format="" Format the output using the given go template - --help Print usage +Options: + -f, --format string Format the output using the given go template + --help Print usage +``` By default, this will render all version information in an easy to read layout. If a format is specified, the given template will be executed instead. diff --git a/docs/reference/commandline/volume_create.md b/docs/reference/commandline/volume_create.md index e1f642fbf7..56c8a5fcc0 100644 --- a/docs/reference/commandline/volume_create.md +++ b/docs/reference/commandline/volume_create.md @@ -10,15 +10,18 @@ parent = "smn_cli" # volume create - Usage: docker volume create [OPTIONS] +```markdown +Usage: docker volume create [OPTIONS] - Create a volume +Create a volume - -d, --driver=local Specify volume driver name - --help Print usage - --label=[] Set metadata for a volume - --name= Specify volume name - -o, --opt=map[] Set driver specific options +Options: + -d, --driver string Specify volume driver name (default "local") + --help Print usage + --label value Set metadata for a volume (default []) + --name string Specify volume name + -o, --opt value Set driver specific options (default map[]) +``` Creates a new volume that containers can consume and store data in. If a name is not specified, Docker generates a random name. You create a volume and then configure the container to use it, for example: diff --git a/docs/reference/commandline/volume_inspect.md b/docs/reference/commandline/volume_inspect.md index d8b7702360..fac9438e3d 100644 --- a/docs/reference/commandline/volume_inspect.md +++ b/docs/reference/commandline/volume_inspect.md @@ -10,12 +10,15 @@ parent = "smn_cli" # volume inspect - Usage: docker volume inspect [OPTIONS] VOLUME [VOLUME...] +```markdown +Usage: docker volume inspect [OPTIONS] VOLUME [VOLUME...] - Display detailed information on one or more volumes +Display detailed information on one or more volumes - -f, --format= Format the output using the given go template. - --help Print usage +Options: + -f, --format string Format the output using the given go template + --help Print usage +``` Returns information about a volume. By default, this command renders all results in a JSON array. You can specify an alternate format to execute a diff --git a/docs/reference/commandline/volume_ls.md b/docs/reference/commandline/volume_ls.md index 12ed40c401..cdeea42e8c 100644 --- a/docs/reference/commandline/volume_ls.md +++ b/docs/reference/commandline/volume_ls.md @@ -10,16 +10,22 @@ parent = "smn_cli" # volume ls - Usage: docker volume ls [OPTIONS] +```markdown +Usage: docker volume ls [OPTIONS] - List volumes +List volumes - -f, --filter=[] Filter output based on these conditions: - - dangling= a volume if referenced or not - - driver= a volume's driver name - - name= a volume's name - --help Print usage - -q, --quiet Only display volume names +Aliases: + ls, list + +Options: + -f, --filter value Provide filter values (i.e. 'dangling=true') (default []) + - dangling= a volume if referenced or not + - driver= a volume's driver name + - name= a volume's name + --help Print usage + -q, --quiet Only display volume names +``` Lists all the volumes Docker knows about. You can filter using the `-f` or `--filter` flag. Refer to the [filtering](#filtering) section for more information about available filter options. diff --git a/docs/reference/commandline/volume_rm.md b/docs/reference/commandline/volume_rm.md index c163ddf680..1760a5d905 100644 --- a/docs/reference/commandline/volume_rm.md +++ b/docs/reference/commandline/volume_rm.md @@ -10,11 +10,17 @@ parent = "smn_cli" # volume rm - Usage: docker volume rm [OPTIONS] VOLUME [VOLUME...] +```markdown +Usage: docker volume rm VOLUME [VOLUME]... - Remove a volume +Remove a volume - --help Print usage +Aliases: + rm, remove + +Options: + --help Print usage +``` Removes one or more volumes. You cannot remove a volume that is in use by a container. diff --git a/docs/reference/commandline/wait.md b/docs/reference/commandline/wait.md index 5cd9a7b9f6..b10f6a1a21 100644 --- a/docs/reference/commandline/wait.md +++ b/docs/reference/commandline/wait.md @@ -10,8 +10,11 @@ parent = "smn_cli" # wait - Usage: docker wait [OPTIONS] CONTAINER [CONTAINER...] +```markdown +Usage: docker wait CONTAINER [CONTAINER...] - Block until a container stops, then print its exit code. +Block until a container stops, then print its exit code - --help Print usage +Options: + --help Print usage +```