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
Usage: docker attach [OPTIONS] CONTAINER ```markdown
Usage: docker attach [OPTIONS] CONTAINER
Attach to a running container Attach to a running container
--detach-keys="<sequence>" Set up escape key sequence Options:
--help Print usage --detach-keys string Override the key sequence for detaching a container
--no-stdin Do not attach STDIN --help Print usage
--sig-proxy=true Proxy all received signals to the process --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 `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
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 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)
--force-rm Always remove intermediate containers -f, --file string Name of the Dockerfile (Default is 'PATH/Dockerfile')
--help Print usage --force-rm Always remove intermediate containers
--isolation="" Container isolation technology --help Print usage
--label=[] Set metadata for an image --isolation string Container isolation technology
-m, --memory="" Memory limit for all build containers --label value Set metadata for an image (default [])
--memory-swap="" A positive integer equal to memory plus swap. Specify -1 to enable unlimited swap. -m, --memory string Memory limit
--no-cache Do not use cache when building the image --memory-swap string Swap limit equal to memory plus swap: '-1' to enable unlimited swap
--pull Always attempt to pull a newer version of the image --no-cache Do not use cache when building the image
-q, --quiet Suppress the build output and print image ID on success --pull Always attempt to pull a newer version of the image
--rm=true Remove intermediate containers after a successful build -q, --quiet Suppress the build output and print image ID on success
--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`. --rm Remove intermediate containers after a successful build (default true)
-t, --tag=[] Name and optionally a tag in the 'name:tag' format --shm-size string Size of /dev/shm, default value is 64MB.
--ulimit=[] Ulimit options 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.
-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`:
$ docker ```bash
Usage: docker [OPTIONS] COMMAND [arg...] $ docker
docker daemon [ --help | ... ] Usage: docker [OPTIONS] COMMAND [arg...]
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
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 <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>")
--help Print usage -c, --change value Apply Dockerfile instruction to the created image (default [])
-m, --message="" Commit message --help Print usage
-p, --pause=true Pause container during commit -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 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
Usage: docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH | - ```markdown
docker cp [OPTIONS] SRC_PATH | - CONTAINER:DEST_PATH 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 Use '-' as the source to read a tar archive from stdin
--help Print usage 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`. 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.
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 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
-i, --interactive Keep STDIN open even if not attached -h, --hostname string Container host name
--ip="" Container IPv4 address (e.g. 172.30.100.104) -i, --interactive Keep STDIN open even if not attached
--ip6="" Container IPv6 address (e.g. 2001:db8::33) --io-maxbandwidth string Maximum IO bandwidth limit for the system drive (Windows only)
--ipc="" IPC namespace to use --io-maxiops uint Maximum IOps limit for the system drive (Windows only)
--isolation="" Container isolation technology --ip string Container IPv4 address (e.g. 172.30.100.104)
--kernel-memory="" Kernel memory limit --ip6 string Container IPv6 address (e.g. 2001:db8::33)
-l, --label=[] Set metadata on the container (e.g., --label=com.example.key=value) --ipc string IPC namespace to use
--label-file=[] Read in a line delimited file of labels --isolation string Container isolation technology
--link=[] Add link to another container --kernel-memory string Kernel memory limit
--link-local-ip=[] Container IPv4/IPv6 link-local addresses (e.g. 169.254.0.77, fe80::77) -l, --label value Set meta data on a container (default [])
--log-driver="" Logging driver for container --label-file value Read in a line delimited file of labels (default [])
--log-opt=[] Log driver specific options --link value Add link to another container (default [])
-m, --memory="" Memory limit --link-local-ip value Container IPv4/IPv6 link-local addresses (default [])
--mac-address="" Container MAC address (e.g. 92:d0:c6:0a:29:33) --log-driver string Logging driver for container
--memory-reservation="" Memory soft limit --log-opt value Log driver options (default [])
--memory-swap="" A positive integer equal to memory plus swap. Specify -1 to enable unlimited swap. --mac-address string Container MAC address (e.g. 92:d0:c6:0a:29:33)
--memory-swappiness="" Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. -m, --memory string Memory limit
--name="" Assign a name to the container --memory-reservation string Memory soft limit
--net="bridge" Connect a container to a network --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), 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),
-t, --tty Allocate a pseudo-TTY or `g` (gigabytes). If you omit the unit, the system uses bytes.
-u, --user="" Username or UID --stop-signal string Signal to stop a container, SIGTERM by default (default "SIGTERM")
--userns="" Container user namespace --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: <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
--help Print usage Options:
--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
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 Options:
--help Print usage -f, --filter value Filter output based on conditions provided (default [])
--since="" Show all events created since timestamp --help Print usage
--until="" Stream events until this timestamp --since string Show all events created since 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
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 -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
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 Options:
-o, --output="" Write to a file, instead of STDOUT --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 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
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 Options:
--help Print usage --help Print usage
--no-trunc Don't truncate output -H, --human Print sizes and dates in human readable format (default true)
-q, --quiet Only show numeric IDs --no-trunc Don't truncate output
-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
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) Options:
--digests Show digests -a, --all Show all images (default hides intermediate images)
-f, --filter=[] Filter output based on these conditions: --digests Show digests
- dangling=(true|false) -f, --filter value Filter output based on conditions provided (default [])
- label=<key> or label=<key>=<value> - dangling=(true|false)
- before=(<image-name>[:tag]|<image-id>|<image@digest>) - label=<key> or label=<key>=<value>
- since=(<image-name>[:tag]|<image-id>|<image@digest>) - before=(<image-name>[:tag]|<image-id>|<image@digest>)
--help Print usage - since=(<image-name>[:tag]|<image-id>|<image@digest>)
--no-trunc Don't truncate output --format string Pretty-print images using a Go template
-q, --quiet Only show numeric IDs --help Print usage
--no-trunc Don't truncate output
-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:
--help Print usage -c, --change value Apply Dockerfile instruction to the created image (default [])
-m, --message= Set commit message for imported image --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 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
Usage: docker info [OPTIONS] Display system-wide information
Display system-wide information
--help Print usage
Options:
--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
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 -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 -s, --size Display total file sizes if the type is container
values are "image" or "container" or "task" values are "image" or "container" or "task
-s, --size Display total file sizes if the type is container --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
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 Options:
-s, --signal="KILL" Signal to send to the container --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 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
Usage: docker load [OPTIONS] ```markdown
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.
--help Print usage Options:
-i, --input="" Read from a tar archive file, instead of STDIN. The tarball may be compressed with gzip, bzip, or xz --help Print usage
-q, --quiet Suppress the load progress bar but still outputs the imported images -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. 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
Usage: docker login [OPTIONS] [SERVER] ```markdown
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.
--help Print usage Options:
-p, --password="" Password --help Print usage
-u, --username="" Username -p, --password string Password
-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
Usage: docker logout [SERVER] ```markdown
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.
--help Print usage Options:
--help Print usage
```
For example: For example:

View File

@ -10,16 +10,19 @@ parent = "smn_cli"
# logs # 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 Options:
-f, --follow Follow log output --details Show extra details provided to logs
--help Print usage -f, --follow Follow log output
--since="" Show logs since timestamp --help Print usage
-t, --timestamps Show timestamps --since string Show logs since timestamp
--tail="all" Number of lines to show from the end of the logs --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 > **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
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 Options:
--help Print usage --alias value Add network-scoped alias for the container (default [])
--ip IPv4 Address --help Print usage
--ip6 IPv6 Address --ip string IP Address
--link=[] Add a link to another container --ip6 string IPv6 Address
--link-local-ip=[] IPv4/IPv6 link-local addresses --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 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
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 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:
--help Print usage -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: 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
Usage: docker network ls [OPTIONS] ```markdown
Usage: docker network ls [OPTIONS]
List networks List networks
-f, --filter=[] Filter output based on conditions provided
--help Print usage Aliases:
--no-trunc Do not truncate the output ls, list
-q, --quiet Only display numeric IDs
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 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
--help Print usage Aliases:
rm, remove
Options:
--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,9 +10,14 @@ parent = "smn_cli"
# node accept # 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. 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
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. 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
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
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,17 +11,19 @@ parent = "smn_cli"
# node ls # node ls
Usage: docker node ls [OPTIONS] ```markdown
Usage: docker node ls [OPTIONS]
List nodes in the swarm List nodes in the swarm
Aliases: Aliases:
ls, list ls, list
Options: Options:
-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
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. 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,17 +11,21 @@ parent = "smn_cli"
# node rm # 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: Aliases:
rm, remove rm, remove
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,15 +11,17 @@ 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
Options: Options:
-a, --all Display all instances -a, --all Display all instances
-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,16 +11,17 @@ parent = "smn_cli"
## update ## 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) --availability string Availability of the node (active/pause/drain)
--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
--help Print usage Options:
--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)
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, 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)
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, 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)
Usage: docker plugin inspect PLUGIN ```markdown
Usage: docker plugin inspect PLUGIN
Return low-level information about a plugin Inspect a plugin
--help Print usage
Options:
--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
--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 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,14 +11,17 @@ parent = "smn_cli"
# plugin ls (experimental) # plugin ls (experimental)
Usage: docker plugin ls ```markdown
Usage: docker plugin ls
List plugins List plugins
Aliases:
ls, list
Options:
--help Print usage --help Print usage
```
Aliases:
ls, list
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,14 +11,17 @@ parent = "smn_cli"
# plugin rm (experimental) # 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: Options:
rm, remove --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

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
--help Print usage Options:
--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,28 +10,31 @@ parent = "smn_cli"
# ps # ps
Usage: docker ps [OPTIONS] ```markdown
Usage: docker ps [OPTIONS]
List containers List containers
-a, --all Show all containers (default shows just running) Options:
-f, --filter=[] Filter output based on these conditions: -a, --all Show all containers (default shows just running)
- exited=<int> an exit code of <int> -f, --filter value Filter output based on conditions provided (default [])
- label=<key> or label=<key>=<value> - exited=<int> an exit code of <int>
- status=(created|restarting|running|paused|exited) - label=<key> or label=<key>=<value>
- name=<string> a container's name - status=(created|restarting|running|paused|exited)
- id=<ID> a container's ID - name=<string> a container's name
- before=(<container-name>|<container-id>) - id=<ID> a container's ID
- since=(<container-name>|<container-id>) - before=(<container-name>|<container-id>)
- ancestor=(<image-name>[:tag]|<image-id>|<image@digest>) - containers created from an image or a descendant. - since=(<container-name>|<container-id>)
- volume=(<volume-name>|<mount-point>) - ancestor=(<image-name>[:tag]|<image-id>|<image@digest>)
--format=[] Pretty-print containers using a Go template containers created from an image or a descendant.
--help Print usage --format string Pretty-print containers using a Go template
-l, --latest Show the latest created container (includes all states) --help Print usage
-n=-1 Show n last created containers (includes all states) -n, --last int Show n last created containers (includes all states) (default -1)
--no-trunc Don't truncate output -l, --latest Show the latest created container (includes all states)
-q, --quiet Only display numeric IDs --no-trunc Don't truncate output
-s, --size Display total file sizes -q, --quiet Only display numeric IDs
-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
-a, --all-tags Download all tagged images in the repository Options:
--disable-content-trust=true Skip image verification -a, --all-tags Download all tagged images in the repository
--help Print usage --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 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
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 Options:
--help Print usage --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) 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
--help Print usage Options:
--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
Usage: docker restart [OPTIONS] CONTAINER [CONTAINER...] ```markdown
Usage: docker restart [OPTIONS] CONTAINER [CONTAINER...]
Restart a container Restart a container
--help Print usage Options:
-t, --time=10 Seconds to wait for stop before killing the container --help Print usage
-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
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) Options:
--help Print usage -f, --force Force the removal of a running container (uses SIGKILL)
-l, --link Remove the specified link --help Print usage
-v, --volumes Remove the volumes associated with the container -l, --link Remove the specified link
-v, --volumes Remove the volumes associated with the container
```
## Examples ## Examples

View File

@ -10,13 +10,16 @@ parent = "smn_cli"
# rmi # 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 Options:
--help Print usage -f, --force Force removal of the image
--no-prune Do not delete untagged parents --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 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
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 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)
-d, --detach Run container in background and print container ID --cpuset-mems string MEMs in which to allow execution (0-3, 0,1)
--detach-keys Specify the escape key sequence used to detach a container -d, --detach Run container in background and print container ID
--device=[] Add a host device to the container --detach-keys string Override the key sequence for detaching a container
--device-read-bps=[] Limit read rate (bytes per second) from a device (e.g., --device-read-bps=/dev/sda:1mb) --device value Add a host device to the container (default [])
--device-read-iops=[] Limit read rate (IO per second) from a device (e.g., --device-read-iops=/dev/sda:1000) --device-read-bps value Limit read rate (bytes 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-read-iops value Limit read rate (IO per second) from 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-bps value Limit write rate (bytes per second) to a device (default [])
--disable-content-trust=true Skip image verification --device-write-iops value Limit write rate (IO per second) to a device (default [])
--dns=[] Set custom DNS servers --disable-content-trust Skip image verification (default true)
--dns-opt=[] Set custom DNS options --dns value Set custom DNS servers (default [])
--dns-search=[] Set custom DNS search domains --dns-opt value Set DNS options (default [])
-e, --env=[] Set environment variables --dns-search value Set custom DNS search domains (default [])
--entrypoint="" Overwrite the default ENTRYPOINT of the image --entrypoint string Overwrite the default ENTRYPOINT of the image
--env-file=[] Read in a file of environment variables -e, --env value Set environment variables (default [])
--expose=[] Expose a port or a range of ports --env-file value Read in a file of environment variables (default [])
--group-add=[] Add additional groups to run as --expose value Expose a port or a range of ports (default [])
-h, --hostname="" Container host name --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
-i, --interactive Keep STDIN open even if not attached -h, --hostname string Container host name
--ip="" Container IPv4 address (e.g. 172.30.100.104) -i, --interactive Keep STDIN open even if not attached
--ip6="" Container IPv6 address (e.g. 2001:db8::33) --io-maxbandwidth string Maximum IO bandwidth limit for the system drive (Windows only)
--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)
-t, --tty Allocate a pseudo-TTY --stop-signal string Signal to stop a container, SIGTERM by default (default "SIGTERM")
-u, --user="" Username or UID (format: <name|uid>[:<group|gid>]) --storage-opt value Set storage driver options per container (default [])
--userns="" Container user namespace --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: <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
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 Options:
-o, --output="" Write to a file, instead of STDOUT --help Print usage
-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
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: Options:
- is-automated=(true|false) -f, --filter value Filter output based on conditions provided (default [])
- is-official=(true|false) - is-automated=(true|false)
- stars=<number> - image has at least 'number' stars - is-official=(true|false)
--help Print usage - stars=<number> - image has at least 'number' stars
--limit=25 Maximum returned search results --help Print usage
--no-trunc Don't truncate output --limit int Max number of search results (default 25)
--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

@ -12,7 +12,7 @@ parent = "smn_cli"
# service create # service create
```Markdown ```Markdown
Usage: docker service create [OPTIONS] IMAGE [COMMAND] [ARG...] Usage: docker service create [OPTIONS] IMAGE [COMMAND] [ARG...]
Create a new service Create a new service
@ -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,7 +12,7 @@ parent = "smn_cli"
# service inspect # service inspect
```Markdown ```Markdown
Usage: docker service inspect [OPTIONS] SERVICE [SERVICE...] Usage: docker service inspect [OPTIONS] SERVICE [SERVICE...]
Display detailed information on one or more services Display detailed information on one or more services

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
Usage: docker service scale SERVICE=REPLICAS [SERVICE=REPLICAS...] ```markdown
Usage: docker service scale SERVICE=REPLICAS [SERVICE=REPLICAS...]
Scale one or multiple services Scale one or multiple services
Options:
--help Print usage
Options:
--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

@ -12,7 +12,7 @@ parent = "smn_cli"
# service update # service update
```Markdown ```Markdown
Usage: docker service update [OPTIONS] SERVICE Usage: docker service update [OPTIONS] SERVICE
Update a service Update a service
@ -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
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 Options:
--detach-keys Specify the escape key sequence used to detach a container -a, --attach Attach STDOUT/STDERR and forward signals
--help Print usage --detach-keys string Override the key sequence for detaching a container
-i, --interactive Attach container's STDIN --help Print usage
-i, --interactive Attach container's STDIN
```

View File

@ -10,13 +10,16 @@ parent = "smn_cli"
# stats # 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) Options:
--help Print usage -a, --all Show all containers (default shows just running)
--no-stream Disable streaming stats and only pull the first result --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. 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
Usage: docker stop [OPTIONS] CONTAINER [CONTAINER...] ```markdown
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
--help Print usage Options:
-t, --time=10 Seconds to wait for stop before killing it --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 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
Usage: docker swarm init [OPTIONS] ```markdown
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)
--external-ca value Specifications of one or more certificate signing endpoints --cert-expiry duration Validity period for node certificates (default 2160h0m0s)
--force-new-cluster Force create a new cluster from current state. --dispatcher-heartbeat duration Dispatcher heartbeat period (default 5s)
--help Print usage --external-ca value Specifications of one or more certificate signing endpoints
--listen-addr value Listen address (default 0.0.0.0:2377) --force-new-cluster Force create a new cluster from current state.
--secret string Set secret value needed to accept nodes into cluster --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 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
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: Options:
--help Print usage --ca-hash string Hash of the Root Certificate Authority certificate used for trusted join
--listen-addr value Listen address (default 0.0.0.0:2377) --help Print usage
--manager Try joining as a manager. --listen-addr value Listen address (default 0.0.0.0:2377)
--secret string Secret for node acceptance --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 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:
--help Print usage --force Force leave ignoring warnings.
--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
Usage: docker swarm update [OPTIONS] ```markdown
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)
--help Print usage --external-ca value Specifications of one or more certificate signing endpoints
--secret string Set secret value needed to accept nodes into cluster --help Print usage
--task-history-limit int Task history retention limit (default 10) --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. 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
--help Print usage Options:
--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
--help Print usage Options:
--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
--help Print usage Options:
--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
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 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
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 Options:
--help Print usage -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 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
Usage: docker volume create [OPTIONS] ```markdown
Usage: docker volume create [OPTIONS]
Create a volume Create a volume
-d, --driver=local Specify volume driver name Options:
--help Print usage -d, --driver string Specify volume driver name (default "local")
--label=[] Set metadata for a volume --help Print usage
--name= Specify volume name --label value Set metadata for a volume (default [])
-o, --opt=map[] Set driver specific options --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: 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
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. Options:
--help Print usage -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 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
Usage: docker volume ls [OPTIONS] ```markdown
Usage: docker volume ls [OPTIONS]
List volumes List volumes
-f, --filter=[] Filter output based on these conditions: Aliases:
- dangling=<boolean> a volume if referenced or not ls, list
- driver=<string> a volume's driver name
- name=<string> a volume's name Options:
--help Print usage -f, --filter value Provide filter values (i.e. 'dangling=true') (default [])
-q, --quiet Only display volume names - dangling=<boolean> a volume if referenced or not
- driver=<string> a volume's driver name
- name=<string> 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. 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
--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. 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
--help Print usage Options:
--help Print usage
```