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 <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester 2016-07-07 20:43:18 +02:00 committed by Tibor Vass
parent e632408a37
commit 3ebe3fe752
74 changed files with 826 additions and 554 deletions

View File

@ -10,14 +10,17 @@ parent = "smn_cli"
# attach # attach
```markdown
Usage: docker attach [OPTIONS] CONTAINER Usage: docker attach [OPTIONS] CONTAINER
Attach to a running container Attach to a running container
--detach-keys="<sequence>" Set up escape key sequence Options:
--detach-keys string Override the key sequence for detaching a container
--help Print usage --help Print usage
--no-stdin Do not attach STDIN --no-stdin Do not attach STDIN
--sig-proxy=true Proxy all received signals to the process --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 `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 the container's ID or name, either to view its ongoing output or to control it

View File

@ -10,32 +10,38 @@ parent = "smn_cli"
# build # build
```markdown
Usage: docker build [OPTIONS] PATH | URL | - 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 Options:
--cpu-shares CPU Shares (relative weight) --build-arg value Set build-time variables (default [])
--cgroup-parent="" Optional parent cgroup for the container --cgroup-parent string Optional parent cgroup for the container
--cpu-period=0 Limit the CPU CFS (Completely Fair Scheduler) period --cpu-period int Limit the CPU CFS (Completely Fair Scheduler) period
--cpu-quota=0 Limit the CPU CFS (Completely Fair Scheduler) quota --cpu-quota int Limit the CPU CFS (Completely Fair Scheduler) quota
--cpuset-cpus="" CPUs in which to allow execution, e.g. `0-3`, `0,1` -c, --cpu-shares int CPU shares (relative weight)
--cpuset-mems="" MEMs in which to allow execution, e.g. `0-3`, `0,1` --cpuset-cpus string CPUs in which to allow execution (0-3, 0,1)
--disable-content-trust=true Skip image verification --cpuset-mems string MEMs in which to allow execution (0-3, 0,1)
-f, --file="" Name of the Dockerfile (Default is 'PATH/Dockerfile') --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 --force-rm Always remove intermediate containers
--help Print usage --help Print usage
--isolation="" Container isolation technology --isolation string Container isolation technology
--label=[] Set metadata for an image --label value Set metadata for an image (default [])
-m, --memory="" Memory limit for all build containers -m, --memory string Memory limit
--memory-swap="" A positive integer equal to memory plus swap. Specify -1 to enable unlimited swap. --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 --no-cache Do not use cache when building the image
--pull Always attempt to pull a newer version of 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 -q, --quiet Suppress the build output and print image ID on success
--rm=true Remove intermediate containers after a successful build --rm Remove intermediate containers after a successful build (default true)
--shm-size=[] Size of `/dev/shm`. The format is `<number><unit>`. `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`. --shm-size string Size of /dev/shm, default value is 64MB.
-t, --tag=[] Name and optionally a tag in the 'name:tag' format The format is `<number><unit>`. `number` must be greater than `0`.
--ulimit=[] Ulimit options 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 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 the files located in the specified `PATH` or `URL`. The build process can refer

View File

@ -14,16 +14,31 @@ weight = -2
To list available commands, either run `docker` with no parameters To list available commands, either run `docker` with no parameters
or execute `docker help`: or execute `docker help`:
```bash
$ docker $ docker
Usage: docker [OPTIONS] COMMAND [arg...] Usage: docker [OPTIONS] COMMAND [arg...]
docker daemon [ --help | ... ]
docker [ --help | -v | --version ] 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 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 each `docker` command with `sudo`. To avoid having to use `sudo` with the

View File

@ -10,15 +10,18 @@ parent = "smn_cli"
# commit # commit
```markdown
Usage: docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]] 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 <hannibal@a-team.com>") Options:
-c, --change=[] Apply specified Dockerfile instructions while committing the image -a, --author string Author (e.g., "John Hannibal Smith <hannibal@a-team.com>")
-c, --change value Apply Dockerfile instruction to the created image (default [])
--help Print usage --help Print usage
-m, --message="" Commit message -m, --message string Commit message
-p, --pause=true Pause container during commit -p, --pause Pause container during commit (default true)
```
It can be useful to commit a container's file changes or settings into a new 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 image. This allows you debug a container by running an interactive shell, or to

View File

@ -10,13 +10,21 @@ parent = "smn_cli"
# cp # cp
```markdown
Usage: docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|- Usage: docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|-
docker cp [OPTIONS] SRC_PATH|- CONTAINER: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
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 -L, --follow-link Always follow symbol link in SRC_PATH
--help Print usage --help Print usage
```
The `docker cp` utility copies the contents of `SRC_PATH` to the `DEST_PATH`. 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 You can copy from the container's file system to the local machine or the

View File

@ -12,95 +12,110 @@ parent = "smn_cli"
Creates a new container. Creates a new container.
```markdown
Usage: docker create [OPTIONS] IMAGE [COMMAND] [ARG...] Usage: docker create [OPTIONS] IMAGE [COMMAND] [ARG...]
Create a new container Create a new container
-a, --attach=[] Attach to STDIN, STDOUT or STDERR Options:
--add-host=[] Add a custom host-to-IP mapping (host:ip) --add-host value Add a custom host-to-IP mapping (host:ip) (default [])
--blkio-weight=0 Block IO weight (relative weight) -a, --attach value Attach to STDIN, STDOUT or STDERR (default [])
--blkio-weight-device=[] Block IO weight (relative device weight, format: `DEVICE_NAME:WEIGHT`) --blkio-weight value Block IO (relative weight), between 10 and 1000
--cpu-shares=0 CPU shares (relative weight) --blkio-weight-device value Block IO weight (relative device weight) (default [])
--cap-add=[] Add Linux capabilities --cap-add value Add Linux capabilities (default [])
--cap-drop=[] Drop Linux capabilities --cap-drop value Drop Linux capabilities (default [])
--cgroup-parent="" Optional parent cgroup for the container --cgroup-parent string Optional parent cgroup for the container
--cidfile="" Write the container ID to the file --cidfile string Write the container ID to the file
--cpu-period=0 Limit CPU CFS (Completely Fair Scheduler) period --cpu-percent int CPU percent (Windows only)
--cpu-quota=0 Limit CPU CFS (Completely Fair Scheduler) quota --cpu-period int Limit CPU CFS (Completely Fair Scheduler) period
--cpuset-cpus="" CPUs in which to allow execution (0-3, 0,1) --cpu-quota int Limit CPU CFS (Completely Fair Scheduler) quota
--cpuset-mems="" Memory nodes (MEMs) in which to allow execution (0-3, 0,1) -c, --cpu-shares int CPU shares (relative weight)
--device=[] Add a host device to the container --cpuset-cpus string CPUs in which to allow execution (0-3, 0,1)
--device-read-bps=[] Limit read rate (bytes per second) from a device (e.g., --device-read-bps=/dev/sda:1mb) --cpuset-mems string MEMs in which to allow execution (0-3, 0,1)
--device-read-iops=[] Limit read rate (IO per second) from a device (e.g., --device-read-iops=/dev/sda:1000) --device value Add a host device to the container (default [])
--device-write-bps=[] Limit write rate (bytes per second) to a device (e.g., --device-write-bps=/dev/sda:1mb) --device-read-bps value Limit read rate (bytes per second) from a device (default [])
--device-write-iops=[] Limit write rate (IO per second) to a device (e.g., --device-write-iops=/dev/sda:1000) --device-read-iops value Limit read rate (IO per second) from a device (default [])
--disable-content-trust=true Skip image verification --device-write-bps value Limit write rate (bytes per second) to a device (default [])
--dns=[] Set custom DNS servers --device-write-iops value Limit write rate (IO per second) to a device (default [])
--dns-opt=[] Set custom DNS options --disable-content-trust Skip image verification (default true)
--dns-search=[] Set custom DNS search domains --dns value Set custom DNS servers (default [])
-e, --env=[] Set environment variables --dns-opt value Set DNS options (default [])
--entrypoint="" Overwrite the default ENTRYPOINT of the image --dns-search value Set custom DNS search domains (default [])
--env-file=[] Read in a file of environment variables --entrypoint string Overwrite the default ENTRYPOINT of the image
--expose=[] Expose a port or a range of ports -e, --env value Set environment variables (default [])
--group-add=[] Add additional groups to join --env-file value Read in a file of environment variables (default [])
-h, --hostname="" Container host name --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 --help Print usage
-h, --hostname string Container host name
-i, --interactive Keep STDIN open even if not attached -i, --interactive Keep STDIN open even if not attached
--ip="" Container IPv4 address (e.g. 172.30.100.104) --io-maxbandwidth string Maximum IO bandwidth limit for the system drive (Windows only)
--ip6="" Container IPv6 address (e.g. 2001:db8::33) --io-maxiops uint Maximum IOps limit for the system drive (Windows only)
--ipc="" IPC namespace to use --ip string Container IPv4 address (e.g. 172.30.100.104)
--isolation="" Container isolation technology --ip6 string Container IPv6 address (e.g. 2001:db8::33)
--kernel-memory="" Kernel memory limit --ipc string IPC namespace to use
-l, --label=[] Set metadata on the container (e.g., --label=com.example.key=value) --isolation string Container isolation technology
--label-file=[] Read in a line delimited file of labels --kernel-memory string Kernel memory limit
--link=[] Add link to another container -l, --label value Set meta data on a container (default [])
--link-local-ip=[] Container IPv4/IPv6 link-local addresses (e.g. 169.254.0.77, fe80::77) --label-file value Read in a line delimited file of labels (default [])
--log-driver="" Logging driver for container --link value Add link to another container (default [])
--log-opt=[] Log driver specific options --link-local-ip value Container IPv4/IPv6 link-local addresses (default [])
-m, --memory="" Memory limit --log-driver string Logging driver for container
--mac-address="" Container MAC address (e.g. 92:d0:c6:0a:29:33) --log-opt value Log driver options (default [])
--memory-reservation="" Memory soft limit --mac-address string Container MAC address (e.g. 92:d0:c6:0a:29:33)
--memory-swap="" A positive integer equal to memory plus swap. Specify -1 to enable unlimited swap. -m, --memory string Memory limit
--memory-swappiness="" Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. --memory-reservation string Memory soft limit
--name="" Assign a name to the container --memory-swap string Swap limit equal to memory plus swap: '-1' to enable unlimited swap
--net="bridge" Connect a container to a network --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 'bridge': create a network stack on the default Docker bridge
'none': no networking 'none': no networking
'container:<name|id>': reuse another container's network stack 'container:<name|id>': reuse another container's network stack
'host': use the Docker host network stack 'host': use the Docker host network stack
'<network-name>|<network-id>': connect to a user-defined network '<network-name>|<network-id>': connect to a user-defined network
--net-alias=[] Add network-scoped alias for the container --net-alias value Add network-scoped alias for the container (default [])
--oom-kill-disable Whether to disable OOM Killer for the container or not --no-healthcheck Disable any container-specified HEALTHCHECK
--oom-score-adj=0 Tune the host's OOM preferences for containers (accepts -1000 to 1000) --oom-kill-disable Disable OOM Killer
-P, --publish-all Publish all exposed ports to random ports --oom-score-adj int Tune host's OOM preferences (-1000 to 1000)
-p, --publish=[] Publish a container's port(s) to the host --pid string PID namespace to use
--pid="" PID namespace to use --pids-limit int Tune container pids limit (set -1 for unlimited), kernel >= 4.3
--pids-limit=-1 Tune container pids limit (set -1 for unlimited), kernel >= 4.3
--privileged Give extended privileges to this container --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 --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")
--runtime="" Name of the runtime to be used for that container Possible values are: no, on-failure[:max-retry], always, unless-stopped
--security-opt=[] Security options --runtime string Runtime to use for this container
--stop-signal="SIGTERM" Signal to stop a container --security-opt value Security Options (default [])
--shm-size=[] Size of `/dev/shm`. The format is `<number><unit>`. `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`. --shm-size string Size of /dev/shm, default value is 64MB.
--storage-opt=[] Set storage driver options per container The format is `<number><unit>`. `number` must be greater than `0`.
--sysctl[=*[]*]] Configure namespaced kernel parameters at runtime 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 -t, --tty Allocate a pseudo-TTY
-u, --user="" Username or UID --ulimit value Ulimit options (default [])
--userns="" Container user namespace -u, --user string Username or UID (format: <name|uid>[:<group|gid>])
--userns string User namespace to use
'host': Use the Docker host user namespace 'host': Use the Docker host user namespace
'': Use the Docker daemon user namespace specified by `--userns-remap` option. '': Use the Docker daemon user namespace specified by `--userns-remap` option.
--ulimit=[] Ulimit options --uts string UTS namespace to use
--uts="" UTS namespace to use -v, --volume value Bind mount a volume (default []). The comma-delimited
-v, --volume=[host-src:]container-dest[:<options>]
Bind mount a volume. The comma-delimited
`options` are [rw|ro], [z|Z], `options` are [rw|ro], [z|Z],
[[r]shared|[r]slave|[r]private], and [[r]shared|[r]slave|[r]private], and
[nocopy]. The 'host-src' is an absolute path [nocopy]. The 'host-src' is an absolute path
or a name value. or a name value.
--volume-driver="" Container's volume driver --volume-driver string Optional volume driver for the container
--volumes-from=[] Mount volumes from the specified container(s) --volumes-from value Mount volumes from the specified container(s) (default [])
-w, --workdir="" Working directory inside the container -w, --workdir string Working directory inside the container
```
The `docker create` command creates a writeable container layer over the The `docker create` command creates a writeable container layer over the
specified image and prepares it for running the specified command. The specified image and prepares it for running the specified command. The

View File

@ -10,11 +10,14 @@ parent = "smn_cli"
# diff # 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
Options:
--help Print usage --help Print usage
```
List the changed files and directories in a container᾿s filesystem List the changed files and directories in a container᾿s filesystem
There are 3 events that are listed in the `diff`: There are 3 events that are listed in the `diff`:

View File

@ -10,14 +10,17 @@ parent = "smn_cli"
# events # events
```markdown
Usage: docker events [OPTIONS] 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 Options:
-f, --filter value Filter output based on conditions provided (default [])
--help Print usage --help Print usage
--since="" Show all events created since timestamp --since string Show all events created since timestamp
--until="" Stream events until this timestamp --until string Stream events until this timestamp
```
Docker containers report the following events: Docker containers report the following events:

View File

@ -10,17 +10,19 @@ parent = "smn_cli"
# exec # exec
```markdown
Usage: docker exec [OPTIONS] CONTAINER COMMAND [ARG...] 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 -d, --detach Detached mode: run command in the background
--detach-keys Specify the escape key sequence used to detach a container --detach-keys Override the key sequence for detaching a container
--help Print usage --help Print usage
-i, --interactive Keep STDIN open even if not attached -i, --interactive Keep STDIN open even if not attached
--privileged Give extended Linux capabilities to the command --privileged Give extended privileges to the command
-t, --tty Allocate a pseudo-TTY -t, --tty Allocate a pseudo-TTY
-u, --user= Username or UID (format: <name|uid>[:<group|gid>]) -u, --user Username or UID (format: <name|uid>[:<group|gid>])
```
The `docker exec` command runs a new command in a running container. The `docker exec` command runs a new command in a running container.

View File

@ -10,12 +10,15 @@ parent = "smn_cli"
# export # export
```markdown
Usage: docker export [OPTIONS] CONTAINER 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
Options:
--help Print usage --help Print usage
-o, --output="" Write to a file, instead of STDOUT -o, --output string Write to a file, instead of STDOUT
```
The `docker export` command does not export the contents of volumes associated 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 with the container. If a volume is mounted on top of an existing directory in

View File

@ -10,14 +10,17 @@ parent = "smn_cli"
# history # history
```markdown
Usage: docker history [OPTIONS] IMAGE 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 Options:
--help Print usage --help Print usage
-H, --human Print sizes and dates in human readable format (default true)
--no-trunc Don't truncate output --no-trunc Don't truncate output
-q, --quiet Only show numeric IDs -q, --quiet Only show numeric IDs
```
To see how the `docker:latest` image was built: To see how the `docker:latest` image was built:

View File

@ -10,20 +10,24 @@ parent = "smn_cli"
# images # images
```markdown
Usage: docker images [OPTIONS] [REPOSITORY[:TAG]] Usage: docker images [OPTIONS] [REPOSITORY[:TAG]]
List images List images
Options:
-a, --all Show all images (default hides intermediate images) -a, --all Show all images (default hides intermediate images)
--digests Show digests --digests Show digests
-f, --filter=[] Filter output based on these conditions: -f, --filter value Filter output based on conditions provided (default [])
- dangling=(true|false) - dangling=(true|false)
- label=<key> or label=<key>=<value> - label=<key> or label=<key>=<value>
- before=(<image-name>[:tag]|<image-id>|<image@digest>) - before=(<image-name>[:tag]|<image-id>|<image@digest>)
- since=(<image-name>[:tag]|<image-id>|<image@digest>) - since=(<image-name>[:tag]|<image-id>|<image@digest>)
--format string Pretty-print images using a Go template
--help Print usage --help Print usage
--no-trunc Don't truncate output --no-trunc Don't truncate output
-q, --quiet Only show numeric IDs -q, --quiet Only show numeric IDs
```
The default `docker images` will show all top level The default `docker images` will show all top level
images, their repository and tags, and their size. images, their repository and tags, and their size.

View File

@ -10,15 +10,16 @@ parent = "smn_cli"
# import # 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 Import the contents from a tarball to create a filesystem image
tarball (.tar, .tar.gz, .tgz, .bzip, .tar.xz, .txz) into it, then
optionally tag it.
-c, --change=[] Apply specified Dockerfile instructions while importing the image Options:
-c, --change value Apply Dockerfile instruction to the created image (default [])
--help Print usage --help Print usage
-m, --message= Set commit message for imported image -m, --message string Set commit message for imported image
```
You can specify a `URL` or `-` (dash) to take data directly from `STDIN`. The 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) `URL` can point to an archive (.tar, .tar.gz, .tgz, .bzip, .tar.xz, or .txz)

View File

@ -10,13 +10,14 @@ parent = "smn_cli"
# info # info
```markdown
Usage: docker info [OPTIONS] Usage: docker info
Display system-wide information Display system-wide information
Options:
--help Print usage --help Print usage
```
This command displays system wide information regarding the Docker installation. This command displays system wide information regarding the Docker installation.
Information displayed includes the kernel version, number of containers and images. Information displayed includes the kernel version, number of containers and images.

View File

@ -10,15 +10,17 @@ parent = "smn_cli"
# inspect # inspect
```markdown
Usage: docker inspect [OPTIONS] CONTAINER|IMAGE|TASK [CONTAINER|IMAGE|TASK...] 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 -f, --format Format the output using the given go template
--help Print usage --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 -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 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. image have the same name, this will return container JSON for unspecified type.

View File

@ -10,12 +10,15 @@ parent = "smn_cli"
# kill # kill
```markdown
Usage: docker kill [OPTIONS] CONTAINER [CONTAINER...] Usage: docker kill [OPTIONS] CONTAINER [CONTAINER...]
Kill a running container using SIGKILL or a specified signal Kill one or more running container
Options:
--help Print usage --help Print usage
-s, --signal="KILL" Signal to send to the container -s, --signal string Signal to send to the container (default "KILL")
```
The main process inside the container will be sent `SIGKILL`, or any The main process inside the container will be sent `SIGKILL`, or any
signal specified with option `--signal`. signal specified with option `--signal`.

View File

@ -10,14 +10,17 @@ parent = "smn_cli"
# load # load
```markdown
Usage: docker load [OPTIONS] Usage: docker load [OPTIONS]
Load an image from a tar archive or STDIN and shows image names or Load an image from a tar archive or STDIN
IDs imported.
Options:
--help Print usage --help Print usage
-i, --input="" Read from a tar archive file, instead of STDIN. The tarball may be compressed with gzip, bzip, or xz -i, --input string Read from tar archive file, instead of STDIN.
-q, --quiet Suppress the load progress bar but still outputs the imported images 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. Loads a tarred repository from a file or the standard input stream.
Restores both images and tags. Restores both images and tags.

View File

@ -10,14 +10,17 @@ parent = "smn_cli"
# login # login
```markdown
Usage: docker login [OPTIONS] [SERVER] Usage: docker login [OPTIONS] [SERVER]
Log in to a Docker registry server, if no server is Log in to a Docker registry.
specified "https://index.docker.io/v1/" is the default. If no server is specified, the default is defined by the daemon.
Options:
--help Print usage --help Print usage
-p, --password="" Password -p, --password string Password
-u, --username="" Username -u, --username string Username
```
If you want to login to a self-hosted registry you can specify this by If you want to login to a self-hosted registry you can specify this by
adding the server name. adding the server name.

View File

@ -10,12 +10,15 @@ parent = "smn_cli"
# logout # logout
```markdown
Usage: docker logout [SERVER] Usage: docker logout [SERVER]
Log out from a Docker registry, if no server is Log out from a Docker registry.
specified "https://index.docker.io/v1/" is the default. If no server is specified, the default is defined by the daemon.
Options:
--help Print usage --help Print usage
```
For example: For example:

View File

@ -10,16 +10,19 @@ parent = "smn_cli"
# logs # logs
```markdown
Usage: docker logs [OPTIONS] CONTAINER Usage: docker logs [OPTIONS] CONTAINER
Fetch the logs of a container Fetch the logs of a container
Options:
--details Show extra details provided to logs --details Show extra details provided to logs
-f, --follow Follow log output -f, --follow Follow log output
--help Print usage --help Print usage
--since="" Show logs since timestamp --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 -t, --timestamps Show timestamps
--tail="all" Number of lines to show from the end of the logs ```
> **Note**: this command is available only for containers with `json-file` and > **Note**: this command is available only for containers with `json-file` and
> `journald` logging drivers. > `journald` logging drivers.

View File

@ -10,16 +10,19 @@ parent = "smn_cli"
# network connect # network connect
```markdown
Usage: docker network connect [OPTIONS] NETWORK CONTAINER 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 Options:
--alias value Add network-scoped alias for the container (default [])
--help Print usage --help Print usage
--ip IPv4 Address --ip string IP Address
--ip6 IPv6 Address --ip6 string IPv6 Address
--link=[] Add a link to another container --link value Add link to another container (default [])
--link-local-ip=[] IPv4/IPv6 link-local addresses --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 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 or by ID. Once connected, the container can communicate with other containers in

View File

@ -10,13 +10,15 @@ parent = "smn_cli"
# network disconnect # network disconnect
```markdown
Usage: docker network disconnect [OPTIONS] NETWORK CONTAINER Usage: docker network disconnect [OPTIONS] NETWORK CONTAINER
Disconnect a container from a network
Disconnects a container from a network Options:
-f, --force Force the container to disconnect from a network -f, --force Force the container to disconnect from a network
--help Print usage --help Print usage
```
Disconnects a container from a network. The container must be running to disconnect it from the network. Disconnects a container from a network. The container must be running to disconnect it from the network.

View File

@ -10,12 +10,15 @@ parent = "smn_cli"
# network inspect # 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. Options:
-f, --format string Format the output using the given go template
--help Print usage --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: 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:

View File

@ -10,13 +10,20 @@ parent = "smn_cli"
# docker network ls # docker network ls
```markdown
Usage: docker network ls [OPTIONS] Usage: docker network ls [OPTIONS]
List networks List networks
-f, --filter=[] Filter output based on conditions provided
Aliases:
ls, list
Options:
-f, --filter value Provide filter values (i.e. 'dangling=true') (default [])
--help Print usage --help Print usage
--no-trunc Do not truncate the output --no-trunc Do not truncate the output
-q, --quiet Only display numeric IDs -q, --quiet Only display volume names
```
Lists all the networks the Engine `daemon` knows about. This includes the Lists all the networks the Engine `daemon` knows about. This includes the
networks that span across multiple hosts in a cluster, for example: networks that span across multiple hosts in a cluster, for example:

View File

@ -10,11 +10,17 @@ parent = "smn_cli"
# network rm # network rm
Usage: docker network rm [OPTIONS] NETWORK [NETWORK...] ```markdown
Usage: docker network rm NETWORK [NETWORK]...
Deletes one or more networks Remove a network
Aliases:
rm, remove
Options:
--help Print usage --help Print usage
```
Removes one or more networks by name or identifier. To remove a network, Removes one or more networks by name or identifier. To remove a network,
you must first disconnect any containers connected to it. you must first disconnect any containers connected to it.

View File

@ -10,10 +10,15 @@ parent = "smn_cli"
# node accept # node accept
```markdown
Usage: docker node accept NODE [NODE...] 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. Accept a node into the swarm. This command targets a docker engine that is a manager in the swarm cluster.

View File

@ -10,9 +10,15 @@ parent = "smn_cli"
# node demote # node demote
```markdown
Usage: docker node demote NODE [NODE...] 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. 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.

View File

@ -11,14 +11,16 @@ parent = "smn_cli"
# node inspect # node inspect
```markdown
Usage: docker node inspect [OPTIONS] self|NODE [NODE...] Usage: docker node inspect [OPTIONS] self|NODE [NODE...]
Display detailed information on one or more nodes Display detailed information on one or more nodes
Options:
-f, --format= Format the output using the given go template. -f, --format string Format the output using the given go template
--help Print usage --help Print usage
-p, --pretty Print the information in a human friendly format. -p, --pretty Print the information in a human friendly format.
```
Returns information about a node. By default, this command renders all results 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 in a JSON array. You can specify an alternate format to execute a

View File

@ -11,6 +11,7 @@ parent = "smn_cli"
# node ls # node ls
```markdown
Usage: docker node ls [OPTIONS] Usage: docker node ls [OPTIONS]
List nodes in the swarm List nodes in the swarm
@ -22,6 +23,7 @@ parent = "smn_cli"
-f, --filter value Filter output based on conditions provided -f, --filter value Filter output based on conditions provided
--help Print usage --help Print usage
-q, --quiet Only display IDs -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. 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.

View File

@ -10,9 +10,14 @@ parent = "smn_cli"
# node promote # node promote
```markdown
Usage: docker node promote NODE [NODE...] 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. Promotes a node that is pending a promotion to manager. This command targets a docker engine that is a manager in the swarm cluster.

View File

@ -11,6 +11,7 @@ parent = "smn_cli"
# node rm # node rm
```markdown
Usage: docker node rm NODE [NODE...] Usage: docker node rm NODE [NODE...]
Remove a node from the swarm Remove a node from the swarm
@ -20,8 +21,11 @@ parent = "smn_cli"
Options: Options:
--help Print usage --help Print usage
```
Removes specified nodes from a swarm. Rejects nodes with `Pending`
membership from the swarm.
Removes nodes that are specified.
Example output: Example output:

View File

@ -11,7 +11,8 @@ parent = "smn_cli"
# node tasks # 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
@ -20,6 +21,7 @@ parent = "smn_cli"
-f, --filter value Filter output based on conditions provided -f, --filter value Filter output based on conditions provided
--help Print usage --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. 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.

View File

@ -11,7 +11,8 @@ parent = "smn_cli"
## update ## update
Usage: docker node update [OPTIONS] Node ```markdown
Usage: docker node update [OPTIONS] NODE
Update a node Update a node
@ -20,7 +21,7 @@ parent = "smn_cli"
--help Print usage --help Print usage
--membership string Membership of the node (accepted/rejected) --membership string Membership of the node (accepted/rejected)
--role string Role of the node (worker/manager) --role string Role of the node (worker/manager)
```
## Related information ## Related information

View File

@ -10,11 +10,14 @@ parent = "smn_cli"
# pause # 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
Options:
--help Print usage --help Print usage
```
The `docker pause` command uses the cgroups freezer to suspend all processes in The `docker pause` command uses the cgroups freezer to suspend all processes in
a container. Traditionally, when suspending a process the `SIGSTOP` signal is a container. Traditionally, when suspending a process the `SIGSTOP` signal is

View File

@ -11,11 +11,14 @@ parent = "smn_cli"
# plugin disable (experimental) # plugin disable (experimental)
```markdown
Usage: docker plugin disable PLUGIN Usage: docker plugin disable PLUGIN
Disable a plugin Disable a plugin
Options:
--help Print usage --help Print usage
```
Disables a plugin. The plugin must be installed before it can be disabled, Disables a plugin. The plugin must be installed before it can be disabled,
see [`docker plugin install`](plugin_install.md). see [`docker plugin install`](plugin_install.md).

View File

@ -11,11 +11,14 @@ parent = "smn_cli"
# plugin enable (experimental) # plugin enable (experimental)
```markdown
Usage: docker plugin enable PLUGIN Usage: docker plugin enable PLUGIN
Enable a plugin Enable a plugin
Options:
--help Print usage --help Print usage
```
Enables a plugin. The plugin must be installed before it can be enabled, Enables a plugin. The plugin must be installed before it can be enabled,
see [`docker plugin install`](plugin_install.md). see [`docker plugin install`](plugin_install.md).

View File

@ -11,12 +11,14 @@ parent = "smn_cli"
# plugin inspect (experimental) # plugin inspect (experimental)
```markdown
Usage: docker plugin inspect PLUGIN Usage: docker plugin inspect PLUGIN
Return low-level information about a plugin Inspect a plugin
Options:
--help Print usage --help Print usage
```
Returns information about a plugin. By default, this command renders all results Returns information about a plugin. By default, this command renders all results
in a JSON array. in a JSON array.

View File

@ -11,11 +11,16 @@ parent = "smn_cli"
# plugin install (experimental) # plugin install (experimental)
Usage: docker plugin install PLUGIN ```markdown
Usage: docker plugin install PLUGIN [OPTIONS]
Install a plugin Install a plugin
Options:
--disable do not enable the plugin on install
--grant-all-permissions grant all permissions necessary to run the plugin
--help Print usage --help Print usage
```
Installs and enables a plugin. Docker looks first for the plugin on your Docker 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 host. If the plugin does not exist locally, then the plugin is pulled from

View File

@ -11,15 +11,18 @@ parent = "smn_cli"
# plugin ls (experimental) # plugin ls (experimental)
```markdown
Usage: docker plugin ls Usage: docker plugin ls
List plugins List plugins
--help Print usage
Aliases: Aliases:
ls, list ls, list
Options:
--help Print usage
```
Lists all the plugins that are currently installed. You can install plugins Lists all the plugins that are currently installed. You can install plugins
using the [`docker plugin install`](plugin_install.md) command. using the [`docker plugin install`](plugin_install.md) command.

View File

@ -11,15 +11,18 @@ parent = "smn_cli"
# plugin rm (experimental) # plugin rm (experimental)
```markdown
Usage: docker plugin rm PLUGIN Usage: docker plugin rm PLUGIN
Remove a plugin Remove a plugin
--help Print usage
Aliases: Aliases:
rm, remove rm, remove
Options:
--help Print usage
```
Removes a plugin. You cannot remove a plugin if it is active, you must disable 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 a plugin using the [`docker plugin disable`](plugin_disable.md) before removing
it. it.

View File

@ -10,12 +10,14 @@ parent = "smn_cli"
# port # 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 List port mappings or a specific mapping for the container
NAT-ed to the PRIVATE_PORT
Options:
--help Print usage --help Print usage
```
You can find out all the ports mapped by not specifying a `PRIVATE_PORT`, or You can find out all the ports mapped by not specifying a `PRIVATE_PORT`, or
just a specific mapping: just a specific mapping:

View File

@ -10,12 +10,14 @@ parent = "smn_cli"
# ps # ps
```markdown
Usage: docker ps [OPTIONS] Usage: docker ps [OPTIONS]
List containers List containers
Options:
-a, --all Show all containers (default shows just running) -a, --all Show all containers (default shows just running)
-f, --filter=[] Filter output based on these conditions: -f, --filter value Filter output based on conditions provided (default [])
- exited=<int> an exit code of <int> - exited=<int> an exit code of <int>
- label=<key> or label=<key>=<value> - label=<key> or label=<key>=<value>
- status=(created|restarting|running|paused|exited) - status=(created|restarting|running|paused|exited)
@ -23,15 +25,16 @@ parent = "smn_cli"
- id=<ID> a container's ID - id=<ID> a container's ID
- before=(<container-name>|<container-id>) - before=(<container-name>|<container-id>)
- since=(<container-name>|<container-id>) - since=(<container-name>|<container-id>)
- ancestor=(<image-name>[:tag]|<image-id>|<image@digest>) - containers created from an image or a descendant. - ancestor=(<image-name>[:tag]|<image-id>|<image@digest>)
- volume=(<volume-name>|<mount-point>) containers created from an image or a descendant.
--format=[] Pretty-print containers using a Go template --format string Pretty-print containers using a Go template
--help Print usage --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) -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 --no-trunc Don't truncate output
-q, --quiet Only display numeric IDs -q, --quiet Only display numeric IDs
-s, --size Display total file sizes -s, --size Display total file sizes
```
Running `docker ps --no-trunc` showing 2 linked containers. Running `docker ps --no-trunc` showing 2 linked containers.

View File

@ -10,13 +10,16 @@ parent = "smn_cli"
# pull # 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
Options:
-a, --all-tags Download all tagged images in the repository -a, --all-tags Download all tagged images in the repository
--disable-content-trust=true Skip image verification --disable-content-trust Skip image verification (default true)
--help Print usage --help Print usage
```
Most of your images will be created on top of a base image from the Most of your images will be created on top of a base image from the
[Docker Hub](https://hub.docker.com) registry. [Docker Hub](https://hub.docker.com) registry.

View File

@ -10,12 +10,15 @@ parent = "smn_cli"
# push # push
```markdown
Usage: docker push [OPTIONS] NAME[:TAG] 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 Options:
--disable-content-trust Skip image verification (default true)
--help Print usage --help Print usage
```
Use `docker push` to share your images to the [Docker Hub](https://hub.docker.com) Use `docker push` to share your images to the [Docker Hub](https://hub.docker.com)
registry or to a self-hosted one. registry or to a self-hosted one.

View File

@ -10,10 +10,13 @@ parent = "smn_cli"
# rename # rename
Usage: docker rename [OPTIONS] OLD_NAME NEW_NAME ```markdown
Usage: docker rename OLD_NAME NEW_NAME
Rename a container Rename a container
Options:
--help Print usage --help Print usage
```
The `docker rename` command allows the container to be renamed to a different name. The `docker rename` command allows the container to be renamed to a different name.

View File

@ -10,9 +10,12 @@ parent = "smn_cli"
# restart # restart
```markdown
Usage: docker restart [OPTIONS] CONTAINER [CONTAINER...] Usage: docker restart [OPTIONS] CONTAINER [CONTAINER...]
Restart a container Restart a container
Options:
--help Print usage --help Print usage
-t, --time=10 Seconds to wait for stop before killing the container -t, --time int Seconds to wait for stop before killing the container (default 10)
```

View File

@ -10,14 +10,17 @@ parent = "smn_cli"
# rm # rm
```markdown
Usage: docker rm [OPTIONS] CONTAINER [CONTAINER...] Usage: docker rm [OPTIONS] CONTAINER [CONTAINER...]
Remove one or more containers Remove one or more containers
Options:
-f, --force Force the removal of a running container (uses SIGKILL) -f, --force Force the removal of a running container (uses SIGKILL)
--help Print usage --help Print usage
-l, --link Remove the specified link -l, --link Remove the specified link
-v, --volumes Remove the volumes associated with the container -v, --volumes Remove the volumes associated with the container
```
## Examples ## Examples

View File

@ -10,13 +10,16 @@ parent = "smn_cli"
# rmi # rmi
```markdown
Usage: docker rmi [OPTIONS] IMAGE [IMAGE...] Usage: docker rmi [OPTIONS] IMAGE [IMAGE...]
Remove one or more images Remove one or more images
Options:
-f, --force Force removal of the image -f, --force Force removal of the image
--help Print usage --help Print usage
--no-prune Do not delete untagged parents --no-prune Do not delete untagged parents
```
You can remove an image using its short or long ID, its tag, or its digest. If 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 an image has one or more tag referencing it, you must remove all of them before

View File

@ -10,109 +10,120 @@ parent = "smn_cli"
# run # run
```markdown
Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...] 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 Options:
--add-host=[] Add a custom host-to-IP mapping (host:ip) --add-host value Add a custom host-to-IP mapping (host:ip) (default [])
--blkio-weight=0 Block IO weight (relative weight) -a, --attach value Attach to STDIN, STDOUT or STDERR (default [])
--blkio-weight-device=[] Block IO weight (relative device weight, format: `DEVICE_NAME:WEIGHT`) --blkio-weight value Block IO (relative weight), between 10 and 1000
--cpu-shares=0 CPU shares (relative weight) --blkio-weight-device value Block IO weight (relative device weight) (default [])
--cap-add=[] Add Linux capabilities --cap-add value Add Linux capabilities (default [])
--cap-drop=[] Drop Linux capabilities --cap-drop value Drop Linux capabilities (default [])
--cgroup-parent="" Optional parent cgroup for the container --cgroup-parent string Optional parent cgroup for the container
--cidfile="" Write the container ID to the file --cidfile string Write the container ID to the file
--cpu-percent=0 Limit percentage of CPU available for execution by the container. Windows daemon only. --cpu-percent int CPU percent (Windows only)
--cpu-period=0 Limit CPU CFS (Completely Fair Scheduler) period --cpu-period int Limit CPU CFS (Completely Fair Scheduler) period
--cpu-quota=0 Limit CPU CFS (Completely Fair Scheduler) quota --cpu-quota int Limit CPU CFS (Completely Fair Scheduler) quota
--cpuset-cpus="" CPUs in which to allow execution (0-3, 0,1) -c, --cpu-shares int CPU shares (relative weight)
--cpuset-mems="" Memory nodes (MEMs) in which to allow execution (0-3, 0,1) --cpuset-cpus string CPUs in which to allow execution (0-3, 0,1)
--cpuset-mems string MEMs in which to allow execution (0-3, 0,1)
-d, --detach Run container in background and print container ID -d, --detach Run container in background and print container ID
--detach-keys Specify the escape key sequence used to detach a container --detach-keys string Override the key sequence for detaching a container
--device=[] Add a host device to the container --device value Add a host device to the container (default [])
--device-read-bps=[] Limit read rate (bytes per second) from a device (e.g., --device-read-bps=/dev/sda:1mb) --device-read-bps value Limit read rate (bytes per second) from a device (default [])
--device-read-iops=[] Limit read rate (IO per second) from a device (e.g., --device-read-iops=/dev/sda:1000) --device-read-iops value Limit read rate (IO per second) from a device (default [])
--device-write-bps=[] Limit write rate (bytes per second) to a device (e.g., --device-write-bps=/dev/sda:1mb) --device-write-bps value Limit write rate (bytes per second) to a device (default [])
--device-write-iops=[] Limit write rate (IO per second) to a device (e.g., --device-write-bps=/dev/sda:1000) --device-write-iops value Limit write rate (IO per second) to a device (default [])
--disable-content-trust=true Skip image verification --disable-content-trust Skip image verification (default true)
--dns=[] Set custom DNS servers --dns value Set custom DNS servers (default [])
--dns-opt=[] Set custom DNS options --dns-opt value Set DNS options (default [])
--dns-search=[] Set custom DNS search domains --dns-search value Set custom DNS search domains (default [])
-e, --env=[] Set environment variables --entrypoint string Overwrite the default ENTRYPOINT of the image
--entrypoint="" Overwrite the default ENTRYPOINT of the image -e, --env value Set environment variables (default [])
--env-file=[] Read in a file of environment variables --env-file value Read in a file of environment variables (default [])
--expose=[] Expose a port or a range of ports --expose value Expose a port or a range of ports (default [])
--group-add=[] Add additional groups to run as --group-add value Add additional groups to join (default [])
-h, --hostname="" Container host name --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 --help Print usage
-h, --hostname string Container host name
-i, --interactive Keep STDIN open even if not attached -i, --interactive Keep STDIN open even if not attached
--ip="" Container IPv4 address (e.g. 172.30.100.104) --io-maxbandwidth string Maximum IO bandwidth limit for the system drive (Windows only)
--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
(Windows only). The format is `<number><unit>`. (Windows only). The format is `<number><unit>`.
Unit is optional and can be `b` (bytes per second), Unit is optional and can be `b` (bytes per second),
`k` (kilobytes per second), `m` (megabytes per second), `k` (kilobytes per second), `m` (megabytes per second),
or `g` (gigabytes per second). If you omit the unit, or `g` (gigabytes per second). If you omit the unit,
the system uses bytes per second. the system uses bytes per second.
--io-maxbandwidth and --io-maxiops are mutually exclusive options. --io-maxbandwidth and --io-maxiops are mutually exclusive options.
--io-maxiops=0 Maximum IO per second limit for the system drive (Windows only). --io-maxiops uint Maximum IOps limit for the system drive (Windows only)
--io-maxbandwidth and --io-maxiops are mutually exclusive options. --ip string Container IPv4 address (e.g. 172.30.100.104)
--memory-reservation="" Memory soft limit --ip6 string Container IPv6 address (e.g. 2001:db8::33)
--memory-swap="" A positive integer equal to memory plus swap. Specify -1 to enable unlimited swap. --ipc string IPC namespace to use
--memory-swappiness="" Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. --isolation string Container isolation technology
--name="" Assign a name to the container --kernel-memory string Kernel memory limit
--net="bridge" Connect a container to a network -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 'bridge': create a network stack on the default Docker bridge
'none': no networking 'none': no networking
'container:<name|id>': reuse another container's network stack 'container:<name|id>': reuse another container's network stack
'host': use the Docker host network stack 'host': use the Docker host network stack
'<network-name>|<network-id>': connect to a user-defined network '<network-name>|<network-id>': connect to a user-defined network
--net-alias=[] Add network-scoped alias for the container --net-alias value Add network-scoped alias for the container (default [])
--oom-kill-disable Whether to disable OOM Killer for the container or not --no-healthcheck Disable any container-specified HEALTHCHECK
--oom-score-adj=0 Tune the host's OOM preferences for containers (accepts -1000 to 1000) --oom-kill-disable Disable OOM Killer
-P, --publish-all Publish all exposed ports to random ports --oom-score-adj int Tune host's OOM preferences (-1000 to 1000)
-p, --publish=[] Publish a container's port(s) to the host --pid string PID namespace to use
--pid="" PID namespace to use --pids-limit int Tune container pids limit (set -1 for unlimited)
--pids-limit=-1 Tune container pids limit (set -1 for unlimited), kernel >= 4.3
--privileged Give extended privileges to this container --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 --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 --rm Automatically remove the container when it exits
--runtime="" Name of the runtime to be used for that container --runtime string Runtime to use for this container
--shm-size=[] Size of `/dev/shm`. The format is `<number><unit>`. `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 value Security Options (default [])
--security-opt=[] Security Options --shm-size string Size of /dev/shm, default value is 64MB.
--sig-proxy=true Proxy received signals to the process The format is `<number><unit>`. `number` must be greater than `0`.
--stop-signal="SIGTERM" Signal to stop a container Unit is optional and can be `b` (bytes), `k` (kilobytes), `m` (megabytes),
--storage-opt=[] Set storage driver options per container or `g` (gigabytes). If you omit the unit, the system uses bytes.
--sysctl[=*[]*]] Configure namespaced kernel parameters at runtime --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 -t, --tty Allocate a pseudo-TTY
-u, --user="" Username or UID (format: <name|uid>[:<group|gid>]) --ulimit value Ulimit options (default [])
--userns="" Container user namespace -u, --user string Username or UID (format: <name|uid>[:<group|gid>])
--userns string User namespace to use
'host': Use the Docker host user namespace 'host': Use the Docker host user namespace
'': Use the Docker daemon user namespace specified by `--userns-remap` option. '': Use the Docker daemon user namespace specified by `--userns-remap` option.
--ulimit=[] Ulimit options --uts string UTS namespace to use
--uts="" UTS namespace to use -v, --volume value Bind mount a volume (default []). The comma-delimited
-v, --volume=[host-src:]container-dest[:<options>]
Bind mount a volume. The comma-delimited
`options` are [rw|ro], [z|Z], `options` are [rw|ro], [z|Z],
[[r]shared|[r]slave|[r]private], and [[r]shared|[r]slave|[r]private], and
[nocopy]. The 'host-src' is an absolute path [nocopy]. The 'host-src' is an absolute path
or a name value. or a name value.
--volume-driver="" Container's volume driver --volume-driver string Optional volume driver for the container
--volumes-from=[] Mount volumes from the specified container(s) --volumes-from value Mount volumes from the specified container(s) (default [])
-w, --workdir="" Working directory inside the container -w, --workdir string Working directory inside the container
```
The `docker run` command first `creates` a writeable container layer over the The `docker run` command first `creates` a writeable container layer over the
specified image, and then `starts` it using the specified command. That is, specified image, and then `starts` it using the specified command. That is,

View File

@ -10,12 +10,15 @@ parent = "smn_cli"
# save # save
```markdown
Usage: docker save [OPTIONS] IMAGE [IMAGE...] 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)
Options:
--help Print usage --help Print usage
-o, --output="" Write to a file, instead of STDOUT -o, --output string Write to a file, instead of STDOUT
```
Produces a tarred repository to the standard output stream. Produces a tarred repository to the standard output stream.
Contains all parent layers, and all tags + versions, or specified `repo:tag`, for Contains all parent layers, and all tags + versions, or specified `repo:tag`, for

View File

@ -10,17 +10,20 @@ parent = "smn_cli"
# search # search
```markdown
Usage: docker search [OPTIONS] TERM Usage: docker search [OPTIONS] TERM
Search the Docker Hub for images Search the Docker Hub for images
--filter=[] Filter output based on these conditions: Options:
-f, --filter value Filter output based on conditions provided (default [])
- is-automated=(true|false) - is-automated=(true|false)
- is-official=(true|false) - is-official=(true|false)
- stars=<number> - image has at least 'number' stars - stars=<number> - image has at least 'number' stars
--help Print usage --help Print usage
--limit=25 Maximum returned search results --limit int Max number of search results (default 25)
--no-trunc Don't truncate output --no-trunc Don't truncate output
```
Search [Docker Hub](https://hub.docker.com) for images Search [Docker Hub](https://hub.docker.com) for images

View File

@ -29,6 +29,7 @@ Options:
--name string Service name --name string Service name
--network value Network attachments (default []) --network value Network attachments (default [])
-p, --publish value Publish a port as a node port (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) --replicas value Number of tasks (default none)
--reserve-cpu value Reserve CPUs (default 0.000) --reserve-cpu value Reserve CPUs (default 0.000)
--reserve-memory value Reserve Memory (default 0 B) --reserve-memory value Reserve Memory (default 0 B)

View File

@ -12,8 +12,6 @@ parent = "smn_cli"
# service ls # service ls
```Markdown ```Markdown
docker service ls --help
Usage: docker service ls [OPTIONS] Usage: docker service ls [OPTIONS]
List services List services

View File

@ -11,13 +11,14 @@ parent = "smn_cli"
# service scale # service scale
```markdown
Usage: docker service scale SERVICE=REPLICAS [SERVICE=REPLICAS...] Usage: docker service scale SERVICE=REPLICAS [SERVICE=REPLICAS...]
Scale one or multiple services Scale one or multiple services
Options: Options:
--help Print usage --help Print usage
```
## Examples ## Examples

View File

@ -54,7 +54,7 @@ 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 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"`). 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, Multiple filter flags are combined as an `OR` filter. For example,
`-f type=custom -f type=builtin` returns both `custom` and `builtin` networks. `-f name=redis.1 -f name=redis.7` returns both `redis.1` and `redis.7` tasks.
The currently supported filters are: The currently supported filters are:

View File

@ -27,11 +27,11 @@ Options:
-l, --label value Service labels (default []) -l, --label value Service labels (default [])
--limit-cpu value Limit CPUs (default 0.000) --limit-cpu value Limit CPUs (default 0.000)
--limit-memory value Limit Memory (default 0 B) --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 -m, --mount value Attach a mount to the service
--name string Service name --name string Service name
--network value Network attachments (default []) --network value Network attachments (default [])
-p, --publish value Publish a port as a node port (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) --replicas value Number of tasks (default none)
--reserve-cpu value Reserve CPUs (default 0.000) --reserve-cpu value Reserve CPUs (default 0.000)
--reserve-memory value Reserve Memory (default 0 B) --reserve-memory value Reserve Memory (default 0 B)

View File

@ -10,11 +10,14 @@ parent = "smn_cli"
# start # start
```markdown
Usage: docker start [OPTIONS] CONTAINER [CONTAINER...] Usage: docker start [OPTIONS] CONTAINER [CONTAINER...]
Start one or more containers Start one or more stopped containers
Options:
-a, --attach Attach STDOUT/STDERR and forward signals -a, --attach Attach STDOUT/STDERR and forward signals
--detach-keys Specify the escape key sequence used to detach a container --detach-keys string Override the key sequence for detaching a container
--help Print usage --help Print usage
-i, --interactive Attach container's STDIN -i, --interactive Attach container's STDIN
```

View File

@ -10,13 +10,16 @@ parent = "smn_cli"
# stats # stats
```markdown
Usage: docker stats [OPTIONS] [CONTAINER...] 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
Options:
-a, --all Show all containers (default shows just running) -a, --all Show all containers (default shows just running)
--help Print usage --help Print usage
--no-stream Disable streaming stats and only pull the first result --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. 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.

View File

@ -10,13 +10,15 @@ parent = "smn_cli"
# stop # stop
```markdown
Usage: docker stop [OPTIONS] CONTAINER [CONTAINER...] Usage: docker stop [OPTIONS] CONTAINER [CONTAINER...]
Stop a container by sending SIGTERM and then SIGKILL after a Stop one or more running containers
grace period
Options:
--help Print usage --help Print usage
-t, --time=10 Seconds to wait for stop before killing it -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 The main process inside the container will receive `SIGTERM`, and after a grace
period, `SIGKILL`. period, `SIGKILL`.

View File

@ -11,17 +11,22 @@ parent = "smn_cli"
# swarm init # swarm init
```markdown
Usage: docker swarm init [OPTIONS] Usage: docker swarm init [OPTIONS]
Initialize a Swarm. Initialize a Swarm
Options: Options:
--auto-accept value Acceptance policy (default [worker,manager]) --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 --external-ca value Specifications of one or more certificate signing endpoints
--force-new-cluster Force create a new cluster from current state. --force-new-cluster Force create a new cluster from current state.
--help Print usage --help Print usage
--listen-addr value Listen address (default 0.0.0.0:2377) --listen-addr value Listen address (default 0.0.0.0:2377)
--secret string Set secret value needed to accept nodes into cluster --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 Initialize a Swarm cluster. The docker engine targeted by this command becomes a manager
in the newly created one node Swarm cluster. in the newly created one node Swarm cluster.
@ -61,6 +66,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 $ 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` ### `--external-ca value`
This flag sets up the swarm to use an external CA to issue node certificates. The value takes This flag sets up the swarm to use an external CA to issue node certificates. The value takes
@ -80,6 +94,10 @@ The node listens for inbound Swarm manager traffic on this IP:PORT
Secret value needed to accept nodes into the Swarm Secret value needed to accept nodes into the Swarm
### `--task-history-limit`
This flag sets up task history retention limit.
## Related information ## Related information
* [swarm join](swarm_join.md) * [swarm join](swarm_join.md)

View File

@ -11,15 +11,18 @@ parent = "smn_cli"
# swarm join # swarm join
```markdown
Usage: docker swarm join [OPTIONS] HOST:PORT 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: Options:
--ca-hash string Hash of the Root Certificate Authority certificate used for trusted join
--help Print usage --help Print usage
--listen-addr value Listen address (default 0.0.0.0:2377) --listen-addr value Listen address (default 0.0.0.0:2377)
--manager Try joining as a manager. --manager Try joining as a manager.
--secret string Secret for node acceptance --secret string Secret for node acceptance
```
Join a node to a Swarm cluster. If the `--manager` flag is specified, the docker engine 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`. targeted by this command becomes a `manager`. If it is not specified, it becomes a `worker`.
@ -47,14 +50,18 @@ dkp8vy1dq1kxleu9g4u78tlag worker1 Accepted Ready Active Reachab
dvfxp4zseq4s0rih1selh0d20 * manager1 Accepted Ready Active Reachable Yes 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` ### `--listen-addr value`
The node listens for inbound Swarm manager traffic on this IP:PORT The node listens for inbound Swarm manager traffic on this IP:PORT
### `--manager`
Joins the node as a manager
### `--secret string` ### `--secret string`
Secret value required for nodes to join the swarm Secret value required for nodes to join the swarm

View File

@ -11,12 +11,15 @@ parent = "smn_cli"
# swarm leave # swarm leave
Usage: docker swarm leave ```markdown
Usage: docker swarm leave [OPTIONS]
Leave a Swarm swarm. Leave a Swarm
Options: Options:
--force Force leave ignoring warnings.
--help Print usage --help Print usage
```
This command causes the node to leave the swarm. This command causes the node to leave the swarm.

View File

@ -11,17 +11,20 @@ parent = "smn_cli"
# swarm update # swarm update
```markdown
Usage: docker swarm update [OPTIONS] Usage: docker swarm update [OPTIONS]
Update the Swarm. Update the Swarm
Options: Options:
--auto-accept value Auto acceptance policy (worker, manager or none) --auto-accept value Auto acceptance policy (worker, manager or none)
--external-ca value Specifications of one or more certificate signing endpoints --cert-expiry duration Validity period for node certificates (default 2160h0m0s)
--dispatcher-heartbeat duration Dispatcher heartbeat period (default 5s) --dispatcher-heartbeat duration Dispatcher heartbeat period (default 5s)
--external-ca value Specifications of one or more certificate signing endpoints
--help Print usage --help Print usage
--secret string Set secret value needed to accept nodes into cluster --secret string Set secret value needed to accept nodes into cluster
--task-history-limit int Task history retention limit (default 10) --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. Updates a Swarm cluster with new parameter values. This command must target a manager node.

View File

@ -10,11 +10,14 @@ parent = "smn_cli"
# tag # 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
Options:
--help Print usage --help Print usage
```
An image name is made up of slash-separated name components, optionally prefixed 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 by a registry hostname. The hostname must comply with standard DNS rules, but

View File

@ -10,8 +10,11 @@ parent = "smn_cli"
# top # 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
Options:
--help Print usage --help Print usage
```

View File

@ -10,11 +10,14 @@ parent = "smn_cli"
# unpause # 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
Options:
--help Print usage --help Print usage
```
The `docker unpause` command uses the cgroups freezer to un-suspend all The `docker unpause` command uses the cgroups freezer to un-suspend all
processes in a container. processes in a container.

View File

@ -10,22 +10,25 @@ parent = "smn_cli"
## update ## update
```markdown
Usage: docker update [OPTIONS] CONTAINER [CONTAINER...] Usage: docker update [OPTIONS] CONTAINER [CONTAINER...]
Update configuration of one or more containers Update configuration of one or more containers
--help=false Print usage Options:
--blkio-weight=0 Block IO (relative weight), between 10 and 1000 --blkio-weight value Block IO (relative weight), between 10 and 1000
--cpu-shares=0 CPU shares (relative weight) --cpu-period int Limit CPU CFS (Completely Fair Scheduler) period
--cpu-period=0 Limit the CPU CFS (Completely Fair Scheduler) period --cpu-quota int Limit CPU CFS (Completely Fair Scheduler) quota
--cpu-quota=0 Limit the CPU CFS (Completely Fair Scheduler) quota -c, --cpu-shares int CPU shares (relative weight)
--cpuset-cpus="" CPUs in which to allow execution (0-3, 0,1) --cpuset-cpus string CPUs in which to allow execution (0-3, 0,1)
--cpuset-mems="" Memory nodes (MEMs) in which to allow execution (0-3, 0,1) --cpuset-mems string MEMs in which to allow execution (0-3, 0,1)
-m, --memory="" Memory limit --help Print usage
--memory-reservation="" Memory soft limit --kernel-memory string Kernel memory limit
--memory-swap="" A positive integer equal to memory plus swap. Specify -1 to enable unlimited swap -m, --memory string Memory limit
--kernel-memory="" Kernel memory limit: container must be stopped --memory-reservation string Memory soft limit
--restart Restart policy to apply when a container exits --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. The `docker update` command dynamically updates container configuration.
You can use this command to prevent containers from consuming too many resources You can use this command to prevent containers from consuming too many resources

View File

@ -10,12 +10,15 @@ parent = "smn_cli"
# version # version
```markdown
Usage: docker version [OPTIONS] Usage: docker version [OPTIONS]
Show the Docker version information. Show the Docker version information
-f, --format="" Format the output using the given go template Options:
-f, --format string Format the output using the given go template
--help Print usage --help Print usage
```
By default, this will render all version information in an easy to read 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. layout. If a format is specified, the given template will be executed instead.

View File

@ -10,15 +10,18 @@ parent = "smn_cli"
# volume create # volume create
```markdown
Usage: docker volume create [OPTIONS] Usage: docker volume create [OPTIONS]
Create a volume Create a volume
-d, --driver=local Specify volume driver name Options:
-d, --driver string Specify volume driver name (default "local")
--help Print usage --help Print usage
--label=[] Set metadata for a volume --label value Set metadata for a volume (default [])
--name= Specify volume name --name string Specify volume name
-o, --opt=map[] Set driver specific options -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: 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:

View File

@ -10,12 +10,15 @@ parent = "smn_cli"
# volume inspect # volume inspect
```markdown
Usage: docker volume inspect [OPTIONS] VOLUME [VOLUME...] 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. Options:
-f, --format string Format the output using the given go template
--help Print usage --help Print usage
```
Returns information about a volume. By default, this command renders all results 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 in a JSON array. You can specify an alternate format to execute a

View File

@ -10,16 +10,22 @@ parent = "smn_cli"
# volume ls # volume ls
```markdown
Usage: docker volume ls [OPTIONS] Usage: docker volume ls [OPTIONS]
List volumes List volumes
-f, --filter=[] Filter output based on these conditions: Aliases:
ls, list
Options:
-f, --filter value Provide filter values (i.e. 'dangling=true') (default [])
- dangling=<boolean> a volume if referenced or not - dangling=<boolean> a volume if referenced or not
- driver=<string> a volume's driver name - driver=<string> a volume's driver name
- name=<string> a volume's name - name=<string> a volume's name
--help Print usage --help Print usage
-q, --quiet Only display volume names -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. 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.

View File

@ -10,11 +10,17 @@ parent = "smn_cli"
# volume rm # volume rm
Usage: docker volume rm [OPTIONS] VOLUME [VOLUME...] ```markdown
Usage: docker volume rm VOLUME [VOLUME]...
Remove a volume Remove a volume
Aliases:
rm, remove
Options:
--help Print usage --help Print usage
```
Removes one or more volumes. You cannot remove a volume that is in use by a container. Removes one or more volumes. You cannot remove a volume that is in use by a container.

View File

@ -10,8 +10,11 @@ parent = "smn_cli"
# wait # 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
Options:
--help Print usage --help Print usage
```