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:
Родитель
e632408a37
Коммит
3ebe3fe752
|
@ -10,14 +10,17 @@ parent = "smn_cli"
|
|||
|
||||
# attach
|
||||
|
||||
Usage: docker attach [OPTIONS] CONTAINER
|
||||
```markdown
|
||||
Usage: docker attach [OPTIONS] CONTAINER
|
||||
|
||||
Attach to a running container
|
||||
Attach to a running container
|
||||
|
||||
--detach-keys="<sequence>" Set up escape key sequence
|
||||
--help Print usage
|
||||
--no-stdin Do not attach STDIN
|
||||
--sig-proxy=true Proxy all received signals to the process
|
||||
Options:
|
||||
--detach-keys string Override the key sequence for detaching a container
|
||||
--help Print usage
|
||||
--no-stdin Do not attach STDIN
|
||||
--sig-proxy Proxy all received signals to the process (default true)
|
||||
```
|
||||
|
||||
The `docker attach` command allows you to attach to a running container using
|
||||
the container's ID or name, either to view its ongoing output or to control it
|
||||
|
|
|
@ -10,32 +10,38 @@ parent = "smn_cli"
|
|||
|
||||
# build
|
||||
|
||||
Usage: docker build [OPTIONS] PATH | URL | -
|
||||
```markdown
|
||||
Usage: docker build [OPTIONS] PATH | URL | -
|
||||
|
||||
Build a new image from the source code at PATH
|
||||
Build an image from a Dockerfile
|
||||
|
||||
--build-arg=[] Set build-time variables
|
||||
--cpu-shares CPU Shares (relative weight)
|
||||
--cgroup-parent="" Optional parent cgroup for the container
|
||||
--cpu-period=0 Limit the CPU CFS (Completely Fair Scheduler) period
|
||||
--cpu-quota=0 Limit the CPU CFS (Completely Fair Scheduler) quota
|
||||
--cpuset-cpus="" CPUs in which to allow execution, e.g. `0-3`, `0,1`
|
||||
--cpuset-mems="" MEMs in which to allow execution, e.g. `0-3`, `0,1`
|
||||
--disable-content-trust=true Skip image verification
|
||||
-f, --file="" Name of the Dockerfile (Default is 'PATH/Dockerfile')
|
||||
--force-rm Always remove intermediate containers
|
||||
--help Print usage
|
||||
--isolation="" Container isolation technology
|
||||
--label=[] Set metadata for an image
|
||||
-m, --memory="" Memory limit for all build containers
|
||||
--memory-swap="" A positive integer equal to memory plus swap. Specify -1 to enable unlimited swap.
|
||||
--no-cache Do not use cache when building the image
|
||||
--pull Always attempt to pull a newer version of the image
|
||||
-q, --quiet Suppress the build output and print image ID on success
|
||||
--rm=true Remove intermediate containers after a successful build
|
||||
--shm-size=[] Size of `/dev/shm`. The format is `<number><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`.
|
||||
-t, --tag=[] Name and optionally a tag in the 'name:tag' format
|
||||
--ulimit=[] Ulimit options
|
||||
Options:
|
||||
--build-arg value Set build-time variables (default [])
|
||||
--cgroup-parent string Optional parent cgroup for the container
|
||||
--cpu-period int Limit the CPU CFS (Completely Fair Scheduler) period
|
||||
--cpu-quota int Limit the CPU CFS (Completely Fair Scheduler) quota
|
||||
-c, --cpu-shares int CPU shares (relative weight)
|
||||
--cpuset-cpus string CPUs in which to allow execution (0-3, 0,1)
|
||||
--cpuset-mems string MEMs in which to allow execution (0-3, 0,1)
|
||||
--disable-content-trust Skip image verification (default true)
|
||||
-f, --file string Name of the Dockerfile (Default is 'PATH/Dockerfile')
|
||||
--force-rm Always remove intermediate containers
|
||||
--help Print usage
|
||||
--isolation string Container isolation technology
|
||||
--label value Set metadata for an image (default [])
|
||||
-m, --memory string Memory limit
|
||||
--memory-swap string Swap limit equal to memory plus swap: '-1' to enable unlimited swap
|
||||
--no-cache Do not use cache when building the image
|
||||
--pull Always attempt to pull a newer version of the image
|
||||
-q, --quiet Suppress the build output and print image ID on success
|
||||
--rm Remove intermediate containers after a successful build (default true)
|
||||
--shm-size string Size of /dev/shm, default value is 64MB.
|
||||
The format is `<number><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
|
||||
the files located in the specified `PATH` or `URL`. The build process can refer
|
||||
|
|
|
@ -14,16 +14,31 @@ weight = -2
|
|||
To list available commands, either run `docker` with no parameters
|
||||
or execute `docker help`:
|
||||
|
||||
$ docker
|
||||
Usage: docker [OPTIONS] COMMAND [arg...]
|
||||
docker daemon [ --help | ... ]
|
||||
docker [ --help | -v | --version ]
|
||||
```bash
|
||||
$ docker
|
||||
Usage: docker [OPTIONS] COMMAND [arg...]
|
||||
docker [ --help | -v | --version ]
|
||||
|
||||
-H, --host=[]: The socket(s) to talk to the Docker daemon in the format of tcp://host:port/path, unix:///path/to/socket, fd://* or fd://socketfd.
|
||||
A self-sufficient runtime for containers.
|
||||
|
||||
A self-sufficient runtime for Linux containers.
|
||||
Options:
|
||||
|
||||
...
|
||||
--config=~/.docker Location of client config files
|
||||
-D, --debug Enable debug mode
|
||||
-H, --host=[] Daemon socket(s) to connect to
|
||||
-h, --help Print usage
|
||||
-l, --log-level=info Set the logging level
|
||||
--tls Use TLS; implied by --tlsverify
|
||||
--tlscacert=~/.docker/ca.pem Trust certs signed only by this CA
|
||||
--tlscert=~/.docker/cert.pem Path to TLS certificate file
|
||||
--tlskey=~/.docker/key.pem Path to TLS key file
|
||||
--tlsverify Use TLS and verify the remote
|
||||
-v, --version Print version information and quit
|
||||
|
||||
Commands:
|
||||
attach Attach to a running container
|
||||
# […]
|
||||
```
|
||||
|
||||
Depending on your Docker system configuration, you may be required to preface
|
||||
each `docker` command with `sudo`. To avoid having to use `sudo` with the
|
||||
|
|
|
@ -10,15 +10,18 @@ parent = "smn_cli"
|
|||
|
||||
# commit
|
||||
|
||||
Usage: docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]
|
||||
```markdown
|
||||
Usage: docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]
|
||||
|
||||
Create a new image from a container's changes
|
||||
Create a new image from a container's changes
|
||||
|
||||
-a, --author="" Author (e.g., "John Hannibal Smith <hannibal@a-team.com>")
|
||||
-c, --change=[] Apply specified Dockerfile instructions while committing the image
|
||||
--help Print usage
|
||||
-m, --message="" Commit message
|
||||
-p, --pause=true Pause container during commit
|
||||
Options:
|
||||
-a, --author string Author (e.g., "John Hannibal Smith <hannibal@a-team.com>")
|
||||
-c, --change value Apply Dockerfile instruction to the created image (default [])
|
||||
--help Print usage
|
||||
-m, --message string Commit message
|
||||
-p, --pause Pause container during commit (default true)
|
||||
```
|
||||
|
||||
It can be useful to commit a container's file changes or settings into a new
|
||||
image. This allows you debug a container by running an interactive shell, or to
|
||||
|
|
|
@ -10,13 +10,21 @@ parent = "smn_cli"
|
|||
|
||||
# cp
|
||||
|
||||
Usage: docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH | -
|
||||
docker cp [OPTIONS] SRC_PATH | - CONTAINER:DEST_PATH
|
||||
```markdown
|
||||
Usage: docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|-
|
||||
docker cp [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATH
|
||||
|
||||
Copy files/folders between a container and the local filesystem
|
||||
Copy files/folders between a container and the local filesystem
|
||||
|
||||
-L, --follow-link Always follow symbol link in SRC_PATH
|
||||
--help Print usage
|
||||
Use '-' as the source to read a tar archive from stdin
|
||||
and extract it to a directory destination in a container.
|
||||
Use '-' as the destination to stream a tar archive of a
|
||||
container source to stdout.
|
||||
|
||||
Options:
|
||||
-L, --follow-link Always follow symbol link in SRC_PATH
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
The `docker cp` utility copies the contents of `SRC_PATH` to the `DEST_PATH`.
|
||||
You can copy from the container's file system to the local machine or the
|
||||
|
|
|
@ -12,95 +12,110 @@ parent = "smn_cli"
|
|||
|
||||
Creates a new container.
|
||||
|
||||
Usage: docker create [OPTIONS] IMAGE [COMMAND] [ARG...]
|
||||
```markdown
|
||||
Usage: docker create [OPTIONS] IMAGE [COMMAND] [ARG...]
|
||||
|
||||
Create a new container
|
||||
Create a new container
|
||||
|
||||
-a, --attach=[] Attach to STDIN, STDOUT or STDERR
|
||||
--add-host=[] Add a custom host-to-IP mapping (host:ip)
|
||||
--blkio-weight=0 Block IO weight (relative weight)
|
||||
--blkio-weight-device=[] Block IO weight (relative device weight, format: `DEVICE_NAME:WEIGHT`)
|
||||
--cpu-shares=0 CPU shares (relative weight)
|
||||
--cap-add=[] Add Linux capabilities
|
||||
--cap-drop=[] Drop Linux capabilities
|
||||
--cgroup-parent="" Optional parent cgroup for the container
|
||||
--cidfile="" Write the container ID to the file
|
||||
--cpu-period=0 Limit CPU CFS (Completely Fair Scheduler) period
|
||||
--cpu-quota=0 Limit CPU CFS (Completely Fair Scheduler) quota
|
||||
--cpuset-cpus="" CPUs in which to allow execution (0-3, 0,1)
|
||||
--cpuset-mems="" Memory nodes (MEMs) in which to allow execution (0-3, 0,1)
|
||||
--device=[] Add a host device to the container
|
||||
--device-read-bps=[] Limit read rate (bytes per second) from a device (e.g., --device-read-bps=/dev/sda:1mb)
|
||||
--device-read-iops=[] Limit read rate (IO per second) from a device (e.g., --device-read-iops=/dev/sda:1000)
|
||||
--device-write-bps=[] Limit write rate (bytes per second) to a device (e.g., --device-write-bps=/dev/sda:1mb)
|
||||
--device-write-iops=[] Limit write rate (IO per second) to a device (e.g., --device-write-iops=/dev/sda:1000)
|
||||
--disable-content-trust=true Skip image verification
|
||||
--dns=[] Set custom DNS servers
|
||||
--dns-opt=[] Set custom DNS options
|
||||
--dns-search=[] Set custom DNS search domains
|
||||
-e, --env=[] Set environment variables
|
||||
--entrypoint="" Overwrite the default ENTRYPOINT of the image
|
||||
--env-file=[] Read in a file of environment variables
|
||||
--expose=[] Expose a port or a range of ports
|
||||
--group-add=[] Add additional groups to join
|
||||
-h, --hostname="" Container host name
|
||||
Options:
|
||||
--add-host value Add a custom host-to-IP mapping (host:ip) (default [])
|
||||
-a, --attach value Attach to STDIN, STDOUT or STDERR (default [])
|
||||
--blkio-weight value Block IO (relative weight), between 10 and 1000
|
||||
--blkio-weight-device value Block IO weight (relative device weight) (default [])
|
||||
--cap-add value Add Linux capabilities (default [])
|
||||
--cap-drop value Drop Linux capabilities (default [])
|
||||
--cgroup-parent string Optional parent cgroup for the container
|
||||
--cidfile string Write the container ID to the file
|
||||
--cpu-percent int CPU percent (Windows only)
|
||||
--cpu-period int Limit CPU CFS (Completely Fair Scheduler) period
|
||||
--cpu-quota int Limit CPU CFS (Completely Fair Scheduler) quota
|
||||
-c, --cpu-shares int CPU shares (relative weight)
|
||||
--cpuset-cpus string CPUs in which to allow execution (0-3, 0,1)
|
||||
--cpuset-mems string MEMs in which to allow execution (0-3, 0,1)
|
||||
--device value Add a host device to the container (default [])
|
||||
--device-read-bps value Limit read rate (bytes per second) from a device (default [])
|
||||
--device-read-iops value Limit read rate (IO per second) from a device (default [])
|
||||
--device-write-bps value Limit write rate (bytes per second) to a device (default [])
|
||||
--device-write-iops value Limit write rate (IO per second) to a device (default [])
|
||||
--disable-content-trust Skip image verification (default true)
|
||||
--dns value Set custom DNS servers (default [])
|
||||
--dns-opt value Set DNS options (default [])
|
||||
--dns-search value Set custom DNS search domains (default [])
|
||||
--entrypoint string Overwrite the default ENTRYPOINT of the image
|
||||
-e, --env value Set environment variables (default [])
|
||||
--env-file value Read in a file of environment variables (default [])
|
||||
--expose value Expose a port or a range of ports (default [])
|
||||
--group-add value Add additional groups to join (default [])
|
||||
--health-cmd string Command to run to check health
|
||||
--health-interval duration Time between running the check
|
||||
--health-retries int Consecutive failures needed to report unhealthy
|
||||
--health-timeout duration Maximum time to allow one check to run
|
||||
--help Print usage
|
||||
-i, --interactive Keep STDIN open even if not attached
|
||||
--ip="" Container IPv4 address (e.g. 172.30.100.104)
|
||||
--ip6="" Container IPv6 address (e.g. 2001:db8::33)
|
||||
--ipc="" IPC namespace to use
|
||||
--isolation="" Container isolation technology
|
||||
--kernel-memory="" Kernel memory limit
|
||||
-l, --label=[] Set metadata on the container (e.g., --label=com.example.key=value)
|
||||
--label-file=[] Read in a line delimited file of labels
|
||||
--link=[] Add link to another container
|
||||
--link-local-ip=[] Container IPv4/IPv6 link-local addresses (e.g. 169.254.0.77, fe80::77)
|
||||
--log-driver="" Logging driver for container
|
||||
--log-opt=[] Log driver specific options
|
||||
-m, --memory="" Memory limit
|
||||
--mac-address="" Container MAC address (e.g. 92:d0:c6:0a:29:33)
|
||||
--memory-reservation="" Memory soft limit
|
||||
--memory-swap="" A positive integer equal to memory plus swap. Specify -1 to enable unlimited swap.
|
||||
--memory-swappiness="" Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100.
|
||||
--name="" Assign a name to the container
|
||||
--net="bridge" Connect a container to a network
|
||||
-h, --hostname string Container host name
|
||||
-i, --interactive Keep STDIN open even if not attached
|
||||
--io-maxbandwidth string Maximum IO bandwidth limit for the system drive (Windows only)
|
||||
--io-maxiops uint Maximum IOps limit for the system drive (Windows only)
|
||||
--ip string Container IPv4 address (e.g. 172.30.100.104)
|
||||
--ip6 string Container IPv6 address (e.g. 2001:db8::33)
|
||||
--ipc string IPC namespace to use
|
||||
--isolation string Container isolation technology
|
||||
--kernel-memory string Kernel memory limit
|
||||
-l, --label value Set meta data on a container (default [])
|
||||
--label-file value Read in a line delimited file of labels (default [])
|
||||
--link value Add link to another container (default [])
|
||||
--link-local-ip value Container IPv4/IPv6 link-local addresses (default [])
|
||||
--log-driver string Logging driver for container
|
||||
--log-opt value Log driver options (default [])
|
||||
--mac-address string Container MAC address (e.g. 92:d0:c6:0a:29:33)
|
||||
-m, --memory string Memory limit
|
||||
--memory-reservation string Memory soft limit
|
||||
--memory-swap string Swap limit equal to memory plus swap: '-1' to enable unlimited swap
|
||||
--memory-swappiness int Tune container memory swappiness (0 to 100) (default -1)
|
||||
--name string Assign a name to the container
|
||||
--net string Connect a container to a network (default "default")
|
||||
'bridge': create a network stack on the default Docker bridge
|
||||
'none': no networking
|
||||
'container:<name|id>': reuse another container's network stack
|
||||
'host': use the Docker host network stack
|
||||
'<network-name>|<network-id>': connect to a user-defined network
|
||||
--net-alias=[] Add network-scoped alias for the container
|
||||
--oom-kill-disable Whether to disable OOM Killer for the container or not
|
||||
--oom-score-adj=0 Tune the host's OOM preferences for containers (accepts -1000 to 1000)
|
||||
-P, --publish-all Publish all exposed ports to random ports
|
||||
-p, --publish=[] Publish a container's port(s) to the host
|
||||
--pid="" PID namespace to use
|
||||
--pids-limit=-1 Tune container pids limit (set -1 for unlimited), kernel >= 4.3
|
||||
--net-alias value Add network-scoped alias for the container (default [])
|
||||
--no-healthcheck Disable any container-specified HEALTHCHECK
|
||||
--oom-kill-disable Disable OOM Killer
|
||||
--oom-score-adj int Tune host's OOM preferences (-1000 to 1000)
|
||||
--pid string PID namespace to use
|
||||
--pids-limit int Tune container pids limit (set -1 for unlimited), kernel >= 4.3
|
||||
--privileged Give extended privileges to this container
|
||||
-p, --publish value Publish a container's port(s) to the host (default [])
|
||||
-P, --publish-all Publish all exposed ports to random ports
|
||||
--read-only Mount the container's root filesystem as read only
|
||||
--restart="no" Restart policy (no, on-failure[:max-retry], always, unless-stopped)
|
||||
--runtime="" Name of the runtime to be used for that container
|
||||
--security-opt=[] Security options
|
||||
--stop-signal="SIGTERM" Signal to stop a container
|
||||
--shm-size=[] Size of `/dev/shm`. The format is `<number><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`.
|
||||
--storage-opt=[] Set storage driver options per container
|
||||
--sysctl[=*[]*]] Configure namespaced kernel parameters at runtime
|
||||
-t, --tty Allocate a pseudo-TTY
|
||||
-u, --user="" Username or UID
|
||||
--userns="" Container user namespace
|
||||
--restart string Restart policy to apply when a container exits (default "no")
|
||||
Possible values are: no, on-failure[:max-retry], always, unless-stopped
|
||||
--runtime string Runtime to use for this container
|
||||
--security-opt value Security Options (default [])
|
||||
--shm-size string Size of /dev/shm, default value is 64MB.
|
||||
The format is `<number><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.
|
||||
--stop-signal string Signal to stop a container, SIGTERM by default (default "SIGTERM")
|
||||
--storage-opt value Set storage driver options per container (default [])
|
||||
--sysctl value Sysctl options (default map[])
|
||||
--tmpfs value Mount a tmpfs directory (default [])
|
||||
-t, --tty Allocate a pseudo-TTY
|
||||
--ulimit value Ulimit options (default [])
|
||||
-u, --user string Username or UID (format: <name|uid>[:<group|gid>])
|
||||
--userns string User namespace to use
|
||||
'host': Use the Docker host user namespace
|
||||
'': Use the Docker daemon user namespace specified by `--userns-remap` option.
|
||||
--ulimit=[] Ulimit options
|
||||
--uts="" UTS namespace to use
|
||||
-v, --volume=[host-src:]container-dest[:<options>]
|
||||
Bind mount a volume. The comma-delimited
|
||||
--uts string UTS namespace to use
|
||||
-v, --volume value Bind mount a volume (default []). The comma-delimited
|
||||
`options` are [rw|ro], [z|Z],
|
||||
[[r]shared|[r]slave|[r]private], and
|
||||
[nocopy]. The 'host-src' is an absolute path
|
||||
or a name value.
|
||||
--volume-driver="" Container's volume driver
|
||||
--volumes-from=[] Mount volumes from the specified container(s)
|
||||
-w, --workdir="" Working directory inside the container
|
||||
--volume-driver string Optional volume driver for the container
|
||||
--volumes-from value Mount volumes from the specified container(s) (default [])
|
||||
-w, --workdir string Working directory inside the container
|
||||
```
|
||||
|
||||
The `docker create` command creates a writeable container layer over the
|
||||
specified image and prepares it for running the specified command. The
|
||||
|
|
|
@ -10,11 +10,14 @@ parent = "smn_cli"
|
|||
|
||||
# diff
|
||||
|
||||
Usage: docker diff [OPTIONS] CONTAINER
|
||||
```markdown
|
||||
Usage: docker diff CONTAINER
|
||||
|
||||
Inspect changes on a container's filesystem
|
||||
Inspect changes on a container's filesystem
|
||||
|
||||
--help Print usage
|
||||
Options:
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
List the changed files and directories in a container᾿s filesystem
|
||||
There are 3 events that are listed in the `diff`:
|
||||
|
|
|
@ -10,14 +10,17 @@ parent = "smn_cli"
|
|||
|
||||
# events
|
||||
|
||||
Usage: docker events [OPTIONS]
|
||||
```markdown
|
||||
Usage: docker events [OPTIONS]
|
||||
|
||||
Get real time events from the server
|
||||
Get real time events from the server
|
||||
|
||||
-f, --filter=[] Filter output based on conditions provided
|
||||
--help Print usage
|
||||
--since="" Show all events created since timestamp
|
||||
--until="" Stream events until this timestamp
|
||||
Options:
|
||||
-f, --filter value Filter output based on conditions provided (default [])
|
||||
--help Print usage
|
||||
--since string Show all events created since timestamp
|
||||
--until string Stream events until this timestamp
|
||||
```
|
||||
|
||||
Docker containers report the following events:
|
||||
|
||||
|
|
|
@ -10,17 +10,19 @@ parent = "smn_cli"
|
|||
|
||||
# exec
|
||||
|
||||
Usage: docker exec [OPTIONS] CONTAINER COMMAND [ARG...]
|
||||
```markdown
|
||||
Usage: docker exec [OPTIONS] CONTAINER COMMAND [ARG...]
|
||||
|
||||
Run a command in a running container
|
||||
Run a command in a running container
|
||||
|
||||
-d, --detach Detached mode: run command in the background
|
||||
--detach-keys Specify the escape key sequence used to detach a container
|
||||
--help Print usage
|
||||
-i, --interactive Keep STDIN open even if not attached
|
||||
--privileged Give extended Linux capabilities to the command
|
||||
-t, --tty Allocate a pseudo-TTY
|
||||
-u, --user= Username or UID (format: <name|uid>[:<group|gid>])
|
||||
-d, --detach Detached mode: run command in the background
|
||||
--detach-keys Override the key sequence for detaching a container
|
||||
--help Print usage
|
||||
-i, --interactive Keep STDIN open even if not attached
|
||||
--privileged Give extended privileges to the command
|
||||
-t, --tty Allocate a pseudo-TTY
|
||||
-u, --user Username or UID (format: <name|uid>[:<group|gid>])
|
||||
```
|
||||
|
||||
The `docker exec` command runs a new command in a running container.
|
||||
|
||||
|
|
|
@ -10,12 +10,15 @@ parent = "smn_cli"
|
|||
|
||||
# export
|
||||
|
||||
Usage: docker export [OPTIONS] CONTAINER
|
||||
```markdown
|
||||
Usage: docker export [OPTIONS] CONTAINER
|
||||
|
||||
Export the contents of a container's filesystem as a tar archive
|
||||
Export a container's filesystem as a tar archive
|
||||
|
||||
--help Print usage
|
||||
-o, --output="" Write to a file, instead of STDOUT
|
||||
Options:
|
||||
--help Print usage
|
||||
-o, --output string Write to a file, instead of STDOUT
|
||||
```
|
||||
|
||||
The `docker export` command does not export the contents of volumes associated
|
||||
with the container. If a volume is mounted on top of an existing directory in
|
||||
|
|
|
@ -10,14 +10,17 @@ parent = "smn_cli"
|
|||
|
||||
# history
|
||||
|
||||
Usage: docker history [OPTIONS] IMAGE
|
||||
```markdown
|
||||
Usage: docker history [OPTIONS] IMAGE
|
||||
|
||||
Show the history of an image
|
||||
Show the history of an image
|
||||
|
||||
-H, --human=true Print sizes and dates in human readable format
|
||||
--help Print usage
|
||||
--no-trunc Don't truncate output
|
||||
-q, --quiet Only show numeric IDs
|
||||
Options:
|
||||
--help Print usage
|
||||
-H, --human Print sizes and dates in human readable format (default true)
|
||||
--no-trunc Don't truncate output
|
||||
-q, --quiet Only show numeric IDs
|
||||
```
|
||||
|
||||
To see how the `docker:latest` image was built:
|
||||
|
||||
|
|
|
@ -10,20 +10,24 @@ parent = "smn_cli"
|
|||
|
||||
# images
|
||||
|
||||
Usage: docker images [OPTIONS] [REPOSITORY[:TAG]]
|
||||
```markdown
|
||||
Usage: docker images [OPTIONS] [REPOSITORY[:TAG]]
|
||||
|
||||
List images
|
||||
List images
|
||||
|
||||
-a, --all Show all images (default hides intermediate images)
|
||||
--digests Show digests
|
||||
-f, --filter=[] Filter output based on these conditions:
|
||||
- dangling=(true|false)
|
||||
- label=<key> or label=<key>=<value>
|
||||
- before=(<image-name>[:tag]|<image-id>|<image@digest>)
|
||||
- since=(<image-name>[:tag]|<image-id>|<image@digest>)
|
||||
--help Print usage
|
||||
--no-trunc Don't truncate output
|
||||
-q, --quiet Only show numeric IDs
|
||||
Options:
|
||||
-a, --all Show all images (default hides intermediate images)
|
||||
--digests Show digests
|
||||
-f, --filter value Filter output based on conditions provided (default [])
|
||||
- dangling=(true|false)
|
||||
- label=<key> or label=<key>=<value>
|
||||
- before=(<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
|
||||
--no-trunc Don't truncate output
|
||||
-q, --quiet Only show numeric IDs
|
||||
```
|
||||
|
||||
The default `docker images` will show all top level
|
||||
images, their repository and tags, and their size.
|
||||
|
|
|
@ -10,15 +10,16 @@ parent = "smn_cli"
|
|||
|
||||
# import
|
||||
|
||||
Usage: docker import file|URL|- [REPOSITORY[:TAG]]
|
||||
```markdown
|
||||
Usage: docker import [OPTIONS] file|URL|- [REPOSITORY[:TAG]]
|
||||
|
||||
Create an empty filesystem image and import the contents of the
|
||||
tarball (.tar, .tar.gz, .tgz, .bzip, .tar.xz, .txz) into it, then
|
||||
optionally tag it.
|
||||
Import the contents from a tarball to create a filesystem image
|
||||
|
||||
-c, --change=[] Apply specified Dockerfile instructions while importing the image
|
||||
--help Print usage
|
||||
-m, --message= Set commit message for imported image
|
||||
Options:
|
||||
-c, --change value Apply Dockerfile instruction to the created image (default [])
|
||||
--help Print usage
|
||||
-m, --message string Set commit message for imported image
|
||||
```
|
||||
|
||||
You can specify a `URL` or `-` (dash) to take data directly from `STDIN`. The
|
||||
`URL` can point to an archive (.tar, .tar.gz, .tgz, .bzip, .tar.xz, or .txz)
|
||||
|
|
|
@ -10,13 +10,14 @@ parent = "smn_cli"
|
|||
|
||||
# info
|
||||
|
||||
```markdown
|
||||
Usage: docker info
|
||||
|
||||
Usage: docker info [OPTIONS]
|
||||
|
||||
Display system-wide information
|
||||
|
||||
--help Print usage
|
||||
Display system-wide information
|
||||
|
||||
Options:
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
This command displays system wide information regarding the Docker installation.
|
||||
Information displayed includes the kernel version, number of containers and images.
|
||||
|
|
|
@ -10,15 +10,17 @@ parent = "smn_cli"
|
|||
|
||||
# inspect
|
||||
|
||||
Usage: docker inspect [OPTIONS] CONTAINER|IMAGE|TASK [CONTAINER|IMAGE|TASK...]
|
||||
```markdown
|
||||
Usage: docker inspect [OPTIONS] CONTAINER|IMAGE|TASK [CONTAINER|IMAGE|TASK...]
|
||||
|
||||
Return low-level information on a container or image or task
|
||||
Return low-level information on a container, image or task
|
||||
|
||||
-f, --format="" Format the output using the given go template
|
||||
--help Print usage
|
||||
--type=container|image|task Return JSON for specified type, permissible
|
||||
values are "image" or "container" or "task"
|
||||
-s, --size Display total file sizes if the type is container
|
||||
-f, --format Format the output using the given go template
|
||||
--help Print usage
|
||||
-s, --size Display total file sizes if the type is container
|
||||
values are "image" or "container" or "task
|
||||
--type Return JSON for specified type, (e.g image, container or task)
|
||||
```
|
||||
|
||||
By default, this will render all results in a JSON array. If the container and
|
||||
image have the same name, this will return container JSON for unspecified type.
|
||||
|
|
|
@ -10,12 +10,15 @@ parent = "smn_cli"
|
|||
|
||||
# kill
|
||||
|
||||
Usage: docker kill [OPTIONS] CONTAINER [CONTAINER...]
|
||||
```markdown
|
||||
Usage: docker kill [OPTIONS] CONTAINER [CONTAINER...]
|
||||
|
||||
Kill a running container using SIGKILL or a specified signal
|
||||
Kill one or more running container
|
||||
|
||||
--help Print usage
|
||||
-s, --signal="KILL" Signal to send to the container
|
||||
Options:
|
||||
--help Print usage
|
||||
-s, --signal string Signal to send to the container (default "KILL")
|
||||
```
|
||||
|
||||
The main process inside the container will be sent `SIGKILL`, or any
|
||||
signal specified with option `--signal`.
|
||||
|
|
|
@ -10,14 +10,17 @@ parent = "smn_cli"
|
|||
|
||||
# load
|
||||
|
||||
Usage: docker load [OPTIONS]
|
||||
```markdown
|
||||
Usage: docker load [OPTIONS]
|
||||
|
||||
Load an image from a tar archive or STDIN and shows image names or
|
||||
IDs imported.
|
||||
Load an image from a tar archive or STDIN
|
||||
|
||||
--help Print usage
|
||||
-i, --input="" Read from a tar archive file, instead of STDIN. The tarball may be compressed with gzip, bzip, or xz
|
||||
-q, --quiet Suppress the load progress bar but still outputs the imported images
|
||||
Options:
|
||||
--help Print usage
|
||||
-i, --input string Read from tar archive file, instead of STDIN.
|
||||
The tarball may be compressed with gzip, bzip, or xz
|
||||
-q, --quiet Suppress the load output but still outputs the imported images
|
||||
```
|
||||
|
||||
Loads a tarred repository from a file or the standard input stream.
|
||||
Restores both images and tags.
|
||||
|
|
|
@ -10,14 +10,17 @@ parent = "smn_cli"
|
|||
|
||||
# login
|
||||
|
||||
Usage: docker login [OPTIONS] [SERVER]
|
||||
```markdown
|
||||
Usage: docker login [OPTIONS] [SERVER]
|
||||
|
||||
Log in to a Docker registry server, if no server is
|
||||
specified "https://index.docker.io/v1/" is the default.
|
||||
Log in to a Docker registry.
|
||||
If no server is specified, the default is defined by the daemon.
|
||||
|
||||
--help Print usage
|
||||
-p, --password="" Password
|
||||
-u, --username="" Username
|
||||
Options:
|
||||
--help Print usage
|
||||
-p, --password string Password
|
||||
-u, --username string Username
|
||||
```
|
||||
|
||||
If you want to login to a self-hosted registry you can specify this by
|
||||
adding the server name.
|
||||
|
|
|
@ -10,12 +10,15 @@ parent = "smn_cli"
|
|||
|
||||
# logout
|
||||
|
||||
Usage: docker logout [SERVER]
|
||||
```markdown
|
||||
Usage: docker logout [SERVER]
|
||||
|
||||
Log out from a Docker registry, if no server is
|
||||
specified "https://index.docker.io/v1/" is the default.
|
||||
Log out from a Docker registry.
|
||||
If no server is specified, the default is defined by the daemon.
|
||||
|
||||
--help Print usage
|
||||
Options:
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
For example:
|
||||
|
||||
|
|
|
@ -10,16 +10,19 @@ parent = "smn_cli"
|
|||
|
||||
# logs
|
||||
|
||||
Usage: docker logs [OPTIONS] CONTAINER
|
||||
```markdown
|
||||
Usage: docker logs [OPTIONS] CONTAINER
|
||||
|
||||
Fetch the logs of a container
|
||||
Fetch the logs of a container
|
||||
|
||||
--details Show extra details provided to logs
|
||||
-f, --follow Follow log output
|
||||
--help Print usage
|
||||
--since="" Show logs since timestamp
|
||||
-t, --timestamps Show timestamps
|
||||
--tail="all" Number of lines to show from the end of the logs
|
||||
Options:
|
||||
--details Show extra details provided to logs
|
||||
-f, --follow Follow log output
|
||||
--help Print usage
|
||||
--since string Show logs since timestamp
|
||||
--tail string Number of lines to show from the end of the logs (default "all")
|
||||
-t, --timestamps Show timestamps
|
||||
```
|
||||
|
||||
> **Note**: this command is available only for containers with `json-file` and
|
||||
> `journald` logging drivers.
|
||||
|
|
|
@ -10,16 +10,19 @@ parent = "smn_cli"
|
|||
|
||||
# network connect
|
||||
|
||||
Usage: docker network connect [OPTIONS] NETWORK CONTAINER
|
||||
```markdown
|
||||
Usage: docker network connect [OPTIONS] NETWORK CONTAINER
|
||||
|
||||
Connect a container to a network
|
||||
Connect a container to a network
|
||||
|
||||
--alias=[] Add network-scoped alias for the container
|
||||
--help Print usage
|
||||
--ip IPv4 Address
|
||||
--ip6 IPv6 Address
|
||||
--link=[] Add a link to another container
|
||||
--link-local-ip=[] IPv4/IPv6 link-local addresses
|
||||
Options:
|
||||
--alias value Add network-scoped alias for the container (default [])
|
||||
--help Print usage
|
||||
--ip string IP Address
|
||||
--ip6 string IPv6 Address
|
||||
--link value Add link to another container (default [])
|
||||
--link-local-ip value Add a link-local address for the container (default [])
|
||||
```
|
||||
|
||||
Connects a container to a network. You can connect a container by name
|
||||
or by ID. Once connected, the container can communicate with other containers in
|
||||
|
|
|
@ -10,13 +10,15 @@ parent = "smn_cli"
|
|||
|
||||
# network disconnect
|
||||
|
||||
Usage: docker network disconnect [OPTIONS] NETWORK CONTAINER
|
||||
```markdown
|
||||
Usage: docker network disconnect [OPTIONS] NETWORK CONTAINER
|
||||
|
||||
Disconnect a container from a network
|
||||
|
||||
Disconnects a container from a network
|
||||
|
||||
-f, --force Force the container to disconnect from a network
|
||||
--help Print usage
|
||||
Options:
|
||||
-f, --force Force the container to disconnect from a network
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
Disconnects a container from a network. The container must be running to disconnect it from the network.
|
||||
|
||||
|
|
|
@ -10,12 +10,15 @@ parent = "smn_cli"
|
|||
|
||||
# network inspect
|
||||
|
||||
Usage: docker network inspect [OPTIONS] NETWORK [NETWORK..]
|
||||
```markdown
|
||||
Usage: docker network inspect [OPTIONS] NETWORK [NETWORK...]
|
||||
|
||||
Displays detailed information on a network
|
||||
Display detailed information on one or more networks
|
||||
|
||||
-f, --format= Format the output using the given go template.
|
||||
--help Print usage
|
||||
Options:
|
||||
-f, --format string Format the output using the given go template
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
Returns information about one or more networks. By default, this command renders all results in a JSON object. For example, if you connect two containers to the default `bridge` network:
|
||||
|
||||
|
|
|
@ -10,13 +10,20 @@ parent = "smn_cli"
|
|||
|
||||
# docker network ls
|
||||
|
||||
Usage: docker network ls [OPTIONS]
|
||||
```markdown
|
||||
Usage: docker network ls [OPTIONS]
|
||||
|
||||
List networks
|
||||
-f, --filter=[] Filter output based on conditions provided
|
||||
--help Print usage
|
||||
--no-trunc Do not truncate the output
|
||||
-q, --quiet Only display numeric IDs
|
||||
List networks
|
||||
|
||||
Aliases:
|
||||
ls, list
|
||||
|
||||
Options:
|
||||
-f, --filter value Provide filter values (i.e. 'dangling=true') (default [])
|
||||
--help Print usage
|
||||
--no-trunc Do not truncate the output
|
||||
-q, --quiet Only display volume names
|
||||
```
|
||||
|
||||
Lists all the networks the Engine `daemon` knows about. This includes the
|
||||
networks that span across multiple hosts in a cluster, for example:
|
||||
|
|
|
@ -10,11 +10,17 @@ parent = "smn_cli"
|
|||
|
||||
# network rm
|
||||
|
||||
Usage: docker network rm [OPTIONS] NETWORK [NETWORK...]
|
||||
```markdown
|
||||
Usage: docker network rm NETWORK [NETWORK]...
|
||||
|
||||
Deletes one or more networks
|
||||
Remove a network
|
||||
|
||||
--help Print usage
|
||||
Aliases:
|
||||
rm, remove
|
||||
|
||||
Options:
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
Removes one or more networks by name or identifier. To remove a network,
|
||||
you must first disconnect any containers connected to it.
|
||||
|
|
|
@ -10,9 +10,14 @@ parent = "smn_cli"
|
|||
|
||||
# node accept
|
||||
|
||||
Usage: docker node accept NODE [NODE...]
|
||||
```markdown
|
||||
Usage: docker node accept NODE [NODE...]
|
||||
|
||||
Accept a node in the swarm
|
||||
Accept a node in the swarm
|
||||
|
||||
Options:
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
Accept a node into the swarm. This command targets a docker engine that is a manager in the swarm cluster.
|
||||
|
||||
|
|
|
@ -10,9 +10,15 @@ parent = "smn_cli"
|
|||
|
||||
# node demote
|
||||
|
||||
Usage: docker node demote NODE [NODE...]
|
||||
```markdown
|
||||
Usage: docker node demote NODE [NODE...]
|
||||
|
||||
Demote a node as manager in the swarm
|
||||
Demote a node from manager in the swarm
|
||||
|
||||
Options:
|
||||
--help Print usage
|
||||
|
||||
```
|
||||
|
||||
Demotes an existing manager so that it is no longer a manager. This command targets a docker engine that is a manager in the swarm cluster.
|
||||
|
||||
|
|
|
@ -11,14 +11,16 @@ parent = "smn_cli"
|
|||
|
||||
# node inspect
|
||||
|
||||
Usage: docker node inspect [OPTIONS] self|NODE [NODE...]
|
||||
```markdown
|
||||
Usage: docker node inspect [OPTIONS] self|NODE [NODE...]
|
||||
|
||||
Display detailed information on one or more nodes
|
||||
Display detailed information on one or more nodes
|
||||
|
||||
|
||||
-f, --format= Format the output using the given go template.
|
||||
--help Print usage
|
||||
-p, --pretty Print the information in a human friendly format.
|
||||
Options:
|
||||
-f, --format string Format the output using the given go template
|
||||
--help Print usage
|
||||
-p, --pretty Print the information in a human friendly format.
|
||||
```
|
||||
|
||||
Returns information about a node. By default, this command renders all results
|
||||
in a JSON array. You can specify an alternate format to execute a
|
||||
|
|
|
@ -11,17 +11,19 @@ parent = "smn_cli"
|
|||
|
||||
# node ls
|
||||
|
||||
Usage: docker node ls [OPTIONS]
|
||||
```markdown
|
||||
Usage: docker node ls [OPTIONS]
|
||||
|
||||
List nodes in the swarm
|
||||
List nodes in the swarm
|
||||
|
||||
Aliases:
|
||||
ls, list
|
||||
Aliases:
|
||||
ls, list
|
||||
|
||||
Options:
|
||||
-f, --filter value Filter output based on conditions provided
|
||||
--help Print usage
|
||||
-q, --quiet Only display IDs
|
||||
Options:
|
||||
-f, --filter value Filter output based on conditions provided
|
||||
--help Print usage
|
||||
-q, --quiet Only display IDs
|
||||
```
|
||||
|
||||
Lists all the nodes that the Docker Swarm manager knows about. You can filter using the `-f` or `--filter` flag. Refer to the [filtering](#filtering) section for more information about available filter options.
|
||||
|
||||
|
|
|
@ -10,9 +10,14 @@ parent = "smn_cli"
|
|||
|
||||
# node promote
|
||||
|
||||
Usage: docker node promote NODE [NODE...]
|
||||
```markdown
|
||||
Usage: docker node promote NODE [NODE...]
|
||||
|
||||
Promote a node as manager in the swarm
|
||||
Promote a node to a manager in the swarm
|
||||
|
||||
Options:
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
Promotes a node that is pending a promotion to manager. This command targets a docker engine that is a manager in the swarm cluster.
|
||||
|
||||
|
|
|
@ -11,17 +11,21 @@ parent = "smn_cli"
|
|||
|
||||
# node rm
|
||||
|
||||
Usage: docker node rm NODE [NODE...]
|
||||
```markdown
|
||||
Usage: docker node rm NODE [NODE...]
|
||||
|
||||
Remove a node from the swarm
|
||||
Remove a node from the swarm
|
||||
|
||||
Aliases:
|
||||
rm, remove
|
||||
Aliases:
|
||||
rm, remove
|
||||
|
||||
Options:
|
||||
--help Print usage
|
||||
Options:
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
Removes specified nodes from a swarm. Rejects nodes with `Pending`
|
||||
membership from the swarm.
|
||||
|
||||
Removes nodes that are specified.
|
||||
|
||||
Example output:
|
||||
|
||||
|
|
|
@ -11,15 +11,17 @@ parent = "smn_cli"
|
|||
|
||||
# node tasks
|
||||
|
||||
Usage: docker node tasks [OPTIONS] NODE
|
||||
```markdown
|
||||
Usage: docker node tasks [OPTIONS] self|NODE
|
||||
|
||||
List tasks running on a node
|
||||
List tasks running on a node
|
||||
|
||||
Options:
|
||||
-a, --all Display all instances
|
||||
-f, --filter value Filter output based on conditions provided
|
||||
Options:
|
||||
-a, --all Display all instances
|
||||
-f, --filter value Filter output based on conditions provided
|
||||
--help Print usage
|
||||
-n, --no-resolve Do not map IDs to Names
|
||||
-n, --no-resolve Do not map IDs to Names
|
||||
```
|
||||
|
||||
Lists all the tasks on a Node that Docker knows about. You can filter using the `-f` or `--filter` flag. Refer to the [filtering](#filtering) section for more information about available filter options.
|
||||
|
||||
|
|
|
@ -11,16 +11,17 @@ parent = "smn_cli"
|
|||
|
||||
## update
|
||||
|
||||
Usage: docker node update [OPTIONS] Node
|
||||
```markdown
|
||||
Usage: docker node update [OPTIONS] NODE
|
||||
|
||||
Update a node
|
||||
Update a node
|
||||
|
||||
Options:
|
||||
Options:
|
||||
--availability string Availability of the node (active/pause/drain)
|
||||
--help Print usage
|
||||
--membership string Membership of the node (accepted/rejected)
|
||||
--role string Role of the node (worker/manager)
|
||||
|
||||
```
|
||||
|
||||
|
||||
## Related information
|
||||
|
|
|
@ -10,11 +10,14 @@ parent = "smn_cli"
|
|||
|
||||
# pause
|
||||
|
||||
Usage: docker pause [OPTIONS] CONTAINER [CONTAINER...]
|
||||
```markdown
|
||||
Usage: docker pause CONTAINER [CONTAINER...]
|
||||
|
||||
Pause all processes within a container
|
||||
Pause all processes within one or more containers
|
||||
|
||||
--help Print usage
|
||||
Options:
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
The `docker pause` command uses the cgroups freezer to suspend all processes in
|
||||
a container. Traditionally, when suspending a process the `SIGSTOP` signal is
|
||||
|
|
|
@ -11,11 +11,14 @@ parent = "smn_cli"
|
|||
|
||||
# plugin disable (experimental)
|
||||
|
||||
Usage: docker plugin disable PLUGIN
|
||||
```markdown
|
||||
Usage: docker plugin disable PLUGIN
|
||||
|
||||
Disable a plugin
|
||||
Disable a plugin
|
||||
|
||||
--help Print usage
|
||||
Options:
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
Disables a plugin. The plugin must be installed before it can be disabled,
|
||||
see [`docker plugin install`](plugin_install.md).
|
||||
|
|
|
@ -11,11 +11,14 @@ parent = "smn_cli"
|
|||
|
||||
# plugin enable (experimental)
|
||||
|
||||
Usage: docker plugin enable PLUGIN
|
||||
```markdown
|
||||
Usage: docker plugin enable PLUGIN
|
||||
|
||||
Enable a plugin
|
||||
Enable a plugin
|
||||
|
||||
--help Print usage
|
||||
Options:
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
Enables a plugin. The plugin must be installed before it can be enabled,
|
||||
see [`docker plugin install`](plugin_install.md).
|
||||
|
|
|
@ -11,12 +11,14 @@ parent = "smn_cli"
|
|||
|
||||
# plugin inspect (experimental)
|
||||
|
||||
Usage: docker plugin inspect PLUGIN
|
||||
```markdown
|
||||
Usage: docker plugin inspect PLUGIN
|
||||
|
||||
Return low-level information about a plugin
|
||||
|
||||
--help Print usage
|
||||
Inspect a plugin
|
||||
|
||||
Options:
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
Returns information about a plugin. By default, this command renders all results
|
||||
in a JSON array.
|
||||
|
|
|
@ -11,11 +11,16 @@ parent = "smn_cli"
|
|||
|
||||
# plugin install (experimental)
|
||||
|
||||
Usage: docker plugin install PLUGIN
|
||||
```markdown
|
||||
Usage: docker plugin install PLUGIN [OPTIONS]
|
||||
|
||||
Install a plugin
|
||||
Install a plugin
|
||||
|
||||
--help Print usage
|
||||
Options:
|
||||
--disable do not enable the plugin on install
|
||||
--grant-all-permissions grant all permissions necessary to run the plugin
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
Installs and enables a plugin. Docker looks first for the plugin on your Docker
|
||||
host. If the plugin does not exist locally, then the plugin is pulled from
|
||||
|
|
|
@ -11,14 +11,17 @@ parent = "smn_cli"
|
|||
|
||||
# plugin ls (experimental)
|
||||
|
||||
Usage: docker plugin ls
|
||||
```markdown
|
||||
Usage: docker plugin ls
|
||||
|
||||
List plugins
|
||||
List plugins
|
||||
|
||||
Aliases:
|
||||
ls, list
|
||||
|
||||
Options:
|
||||
--help Print usage
|
||||
|
||||
Aliases:
|
||||
ls, list
|
||||
```
|
||||
|
||||
Lists all the plugins that are currently installed. You can install plugins
|
||||
using the [`docker plugin install`](plugin_install.md) command.
|
||||
|
|
|
@ -11,14 +11,17 @@ parent = "smn_cli"
|
|||
|
||||
# plugin rm (experimental)
|
||||
|
||||
Usage: docker plugin rm PLUGIN
|
||||
```markdown
|
||||
Usage: docker plugin rm PLUGIN
|
||||
|
||||
Remove a plugin
|
||||
Remove a plugin
|
||||
|
||||
--help Print usage
|
||||
Aliases:
|
||||
rm, remove
|
||||
|
||||
Aliases:
|
||||
rm, remove
|
||||
Options:
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
Removes a plugin. You cannot remove a plugin if it is active, you must disable
|
||||
a plugin using the [`docker plugin disable`](plugin_disable.md) before removing
|
||||
|
|
|
@ -10,12 +10,14 @@ parent = "smn_cli"
|
|||
|
||||
# port
|
||||
|
||||
Usage: docker port [OPTIONS] CONTAINER [PRIVATE_PORT[/PROTO]]
|
||||
```markdown
|
||||
Usage: docker port CONTAINER [PRIVATE_PORT[/PROTO]]
|
||||
|
||||
List port mappings for the CONTAINER, or lookup the public-facing port that is
|
||||
NAT-ed to the PRIVATE_PORT
|
||||
List port mappings or a specific mapping for the container
|
||||
|
||||
--help Print usage
|
||||
Options:
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
You can find out all the ports mapped by not specifying a `PRIVATE_PORT`, or
|
||||
just a specific mapping:
|
||||
|
|
|
@ -10,28 +10,31 @@ parent = "smn_cli"
|
|||
|
||||
# ps
|
||||
|
||||
Usage: docker ps [OPTIONS]
|
||||
```markdown
|
||||
Usage: docker ps [OPTIONS]
|
||||
|
||||
List containers
|
||||
List containers
|
||||
|
||||
-a, --all Show all containers (default shows just running)
|
||||
-f, --filter=[] Filter output based on these conditions:
|
||||
- exited=<int> an exit code of <int>
|
||||
- label=<key> or label=<key>=<value>
|
||||
- status=(created|restarting|running|paused|exited)
|
||||
- name=<string> a container's name
|
||||
- id=<ID> a container's ID
|
||||
- before=(<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.
|
||||
- volume=(<volume-name>|<mount-point>)
|
||||
--format=[] Pretty-print containers using a Go template
|
||||
--help Print usage
|
||||
-l, --latest Show the latest created container (includes all states)
|
||||
-n=-1 Show n last created containers (includes all states)
|
||||
--no-trunc Don't truncate output
|
||||
-q, --quiet Only display numeric IDs
|
||||
-s, --size Display total file sizes
|
||||
Options:
|
||||
-a, --all Show all containers (default shows just running)
|
||||
-f, --filter value Filter output based on conditions provided (default [])
|
||||
- exited=<int> an exit code of <int>
|
||||
- label=<key> or label=<key>=<value>
|
||||
- status=(created|restarting|running|paused|exited)
|
||||
- name=<string> a container's name
|
||||
- id=<ID> a container's ID
|
||||
- before=(<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.
|
||||
--format string Pretty-print containers using a Go template
|
||||
--help Print usage
|
||||
-n, --last int Show n last created containers (includes all states) (default -1)
|
||||
-l, --latest Show the latest created container (includes all states)
|
||||
--no-trunc Don't truncate output
|
||||
-q, --quiet Only display numeric IDs
|
||||
-s, --size Display total file sizes
|
||||
```
|
||||
|
||||
Running `docker ps --no-trunc` showing 2 linked containers.
|
||||
|
||||
|
|
|
@ -10,13 +10,16 @@ parent = "smn_cli"
|
|||
|
||||
# pull
|
||||
|
||||
Usage: docker pull [OPTIONS] NAME[:TAG] | [REGISTRY_HOST[:REGISTRY_PORT]/]NAME[:TAG]
|
||||
```markdown
|
||||
Usage: docker pull [OPTIONS] NAME[:TAG|@DIGEST]
|
||||
|
||||
Pull an image or a repository from the registry
|
||||
Pull an image or a repository from a registry
|
||||
|
||||
-a, --all-tags Download all tagged images in the repository
|
||||
--disable-content-trust=true Skip image verification
|
||||
--help Print usage
|
||||
Options:
|
||||
-a, --all-tags Download all tagged images in the repository
|
||||
--disable-content-trust Skip image verification (default true)
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
Most of your images will be created on top of a base image from the
|
||||
[Docker Hub](https://hub.docker.com) registry.
|
||||
|
|
|
@ -10,12 +10,15 @@ parent = "smn_cli"
|
|||
|
||||
# push
|
||||
|
||||
Usage: docker push [OPTIONS] NAME[:TAG]
|
||||
```markdown
|
||||
Usage: docker push [OPTIONS] NAME[:TAG]
|
||||
|
||||
Push an image or a repository to the registry
|
||||
Push an image or a repository to a registry
|
||||
|
||||
--disable-content-trust=true Skip image signing
|
||||
--help Print usage
|
||||
Options:
|
||||
--disable-content-trust Skip image verification (default true)
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
Use `docker push` to share your images to the [Docker Hub](https://hub.docker.com)
|
||||
registry or to a self-hosted one.
|
||||
|
|
|
@ -10,10 +10,13 @@ parent = "smn_cli"
|
|||
|
||||
# rename
|
||||
|
||||
Usage: docker rename [OPTIONS] OLD_NAME NEW_NAME
|
||||
```markdown
|
||||
Usage: docker rename OLD_NAME NEW_NAME
|
||||
|
||||
Rename a container
|
||||
Rename a container
|
||||
|
||||
--help Print usage
|
||||
Options:
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
The `docker rename` command allows the container to be renamed to a different name.
|
||||
|
|
|
@ -10,9 +10,12 @@ parent = "smn_cli"
|
|||
|
||||
# restart
|
||||
|
||||
Usage: docker restart [OPTIONS] CONTAINER [CONTAINER...]
|
||||
```markdown
|
||||
Usage: docker restart [OPTIONS] CONTAINER [CONTAINER...]
|
||||
|
||||
Restart a container
|
||||
Restart a container
|
||||
|
||||
--help Print usage
|
||||
-t, --time=10 Seconds to wait for stop before killing the container
|
||||
Options:
|
||||
--help Print usage
|
||||
-t, --time int Seconds to wait for stop before killing the container (default 10)
|
||||
```
|
||||
|
|
|
@ -10,14 +10,17 @@ parent = "smn_cli"
|
|||
|
||||
# rm
|
||||
|
||||
Usage: docker rm [OPTIONS] CONTAINER [CONTAINER...]
|
||||
```markdown
|
||||
Usage: docker rm [OPTIONS] CONTAINER [CONTAINER...]
|
||||
|
||||
Remove one or more containers
|
||||
Remove one or more containers
|
||||
|
||||
-f, --force Force the removal of a running container (uses SIGKILL)
|
||||
--help Print usage
|
||||
-l, --link Remove the specified link
|
||||
-v, --volumes Remove the volumes associated with the container
|
||||
Options:
|
||||
-f, --force Force the removal of a running container (uses SIGKILL)
|
||||
--help Print usage
|
||||
-l, --link Remove the specified link
|
||||
-v, --volumes Remove the volumes associated with the container
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
|
|
|
@ -10,13 +10,16 @@ parent = "smn_cli"
|
|||
|
||||
# rmi
|
||||
|
||||
Usage: docker rmi [OPTIONS] IMAGE [IMAGE...]
|
||||
```markdown
|
||||
Usage: docker rmi [OPTIONS] IMAGE [IMAGE...]
|
||||
|
||||
Remove one or more images
|
||||
Remove one or more images
|
||||
|
||||
-f, --force Force removal of the image
|
||||
--help Print usage
|
||||
--no-prune Do not delete untagged parents
|
||||
Options:
|
||||
-f, --force Force removal of the image
|
||||
--help Print usage
|
||||
--no-prune Do not delete untagged parents
|
||||
```
|
||||
|
||||
You can remove an image using its short or long ID, its tag, or its digest. If
|
||||
an image has one or more tag referencing it, you must remove all of them before
|
||||
|
|
|
@ -10,109 +10,120 @@ parent = "smn_cli"
|
|||
|
||||
# run
|
||||
|
||||
Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
|
||||
```markdown
|
||||
Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
|
||||
|
||||
Run a command in a new container
|
||||
Run a command in a new container
|
||||
|
||||
-a, --attach=[] Attach to STDIN, STDOUT or STDERR
|
||||
--add-host=[] Add a custom host-to-IP mapping (host:ip)
|
||||
--blkio-weight=0 Block IO weight (relative weight)
|
||||
--blkio-weight-device=[] Block IO weight (relative device weight, format: `DEVICE_NAME:WEIGHT`)
|
||||
--cpu-shares=0 CPU shares (relative weight)
|
||||
--cap-add=[] Add Linux capabilities
|
||||
--cap-drop=[] Drop Linux capabilities
|
||||
--cgroup-parent="" Optional parent cgroup for the container
|
||||
--cidfile="" Write the container ID to the file
|
||||
--cpu-percent=0 Limit percentage of CPU available for execution by the container. Windows daemon only.
|
||||
--cpu-period=0 Limit CPU CFS (Completely Fair Scheduler) period
|
||||
--cpu-quota=0 Limit CPU CFS (Completely Fair Scheduler) quota
|
||||
--cpuset-cpus="" CPUs in which to allow execution (0-3, 0,1)
|
||||
--cpuset-mems="" Memory nodes (MEMs) in which to allow execution (0-3, 0,1)
|
||||
-d, --detach Run container in background and print container ID
|
||||
--detach-keys Specify the escape key sequence used to detach a container
|
||||
--device=[] Add a host device to the container
|
||||
--device-read-bps=[] Limit read rate (bytes per second) from a device (e.g., --device-read-bps=/dev/sda:1mb)
|
||||
--device-read-iops=[] Limit read rate (IO per second) from a device (e.g., --device-read-iops=/dev/sda:1000)
|
||||
--device-write-bps=[] Limit write rate (bytes per second) to a device (e.g., --device-write-bps=/dev/sda:1mb)
|
||||
--device-write-iops=[] Limit write rate (IO per second) to a device (e.g., --device-write-bps=/dev/sda:1000)
|
||||
--disable-content-trust=true Skip image verification
|
||||
--dns=[] Set custom DNS servers
|
||||
--dns-opt=[] Set custom DNS options
|
||||
--dns-search=[] Set custom DNS search domains
|
||||
-e, --env=[] Set environment variables
|
||||
--entrypoint="" Overwrite the default ENTRYPOINT of the image
|
||||
--env-file=[] Read in a file of environment variables
|
||||
--expose=[] Expose a port or a range of ports
|
||||
--group-add=[] Add additional groups to run as
|
||||
-h, --hostname="" Container host name
|
||||
Options:
|
||||
--add-host value Add a custom host-to-IP mapping (host:ip) (default [])
|
||||
-a, --attach value Attach to STDIN, STDOUT or STDERR (default [])
|
||||
--blkio-weight value Block IO (relative weight), between 10 and 1000
|
||||
--blkio-weight-device value Block IO weight (relative device weight) (default [])
|
||||
--cap-add value Add Linux capabilities (default [])
|
||||
--cap-drop value Drop Linux capabilities (default [])
|
||||
--cgroup-parent string Optional parent cgroup for the container
|
||||
--cidfile string Write the container ID to the file
|
||||
--cpu-percent int CPU percent (Windows only)
|
||||
--cpu-period int Limit CPU CFS (Completely Fair Scheduler) period
|
||||
--cpu-quota int Limit CPU CFS (Completely Fair Scheduler) quota
|
||||
-c, --cpu-shares int CPU shares (relative weight)
|
||||
--cpuset-cpus string CPUs in which to allow execution (0-3, 0,1)
|
||||
--cpuset-mems string MEMs in which to allow execution (0-3, 0,1)
|
||||
-d, --detach Run container in background and print container ID
|
||||
--detach-keys string Override the key sequence for detaching a container
|
||||
--device value Add a host device to the container (default [])
|
||||
--device-read-bps value Limit read rate (bytes per second) from a device (default [])
|
||||
--device-read-iops value Limit read rate (IO per second) from a device (default [])
|
||||
--device-write-bps value Limit write rate (bytes per second) to a device (default [])
|
||||
--device-write-iops value Limit write rate (IO per second) to a device (default [])
|
||||
--disable-content-trust Skip image verification (default true)
|
||||
--dns value Set custom DNS servers (default [])
|
||||
--dns-opt value Set DNS options (default [])
|
||||
--dns-search value Set custom DNS search domains (default [])
|
||||
--entrypoint string Overwrite the default ENTRYPOINT of the image
|
||||
-e, --env value Set environment variables (default [])
|
||||
--env-file value Read in a file of environment variables (default [])
|
||||
--expose value Expose a port or a range of ports (default [])
|
||||
--group-add value Add additional groups to join (default [])
|
||||
--health-cmd string Command to run to check health
|
||||
--health-interval duration Time between running the check
|
||||
--health-retries int Consecutive failures needed to report unhealthy
|
||||
--health-timeout duration Maximum time to allow one check to run
|
||||
--help Print usage
|
||||
-i, --interactive Keep STDIN open even if not attached
|
||||
--ip="" Container IPv4 address (e.g. 172.30.100.104)
|
||||
--ip6="" Container IPv6 address (e.g. 2001:db8::33)
|
||||
--ipc="" IPC namespace to use
|
||||
--isolation="" Container isolation technology
|
||||
--kernel-memory="" Kernel memory limit
|
||||
-l, --label=[] Set metadata on the container (e.g., --label=com.example.key=value)
|
||||
--label-file=[] Read in a file of labels (EOL delimited)
|
||||
--link=[] Add link to another container
|
||||
--link-local-ip=[] Container IPv4/IPv6 link-local addresses (e.g. 169.254.0.77, fe80::77)
|
||||
--log-driver="" Logging driver for container
|
||||
--log-opt=[] Log driver specific options
|
||||
-m, --memory="" Memory limit
|
||||
--mac-address="" Container MAC address (e.g. 92:d0:c6:0a:29:33)
|
||||
--io-maxbandwidth="" Maximum IO bandwidth limit for the system drive
|
||||
-h, --hostname string Container host name
|
||||
-i, --interactive Keep STDIN open even if not attached
|
||||
--io-maxbandwidth string Maximum IO bandwidth limit for the system drive (Windows only)
|
||||
(Windows only). The format is `<number><unit>`.
|
||||
Unit is optional and can be `b` (bytes per second),
|
||||
`k` (kilobytes per second), `m` (megabytes per second),
|
||||
or `g` (gigabytes per second). If you omit the unit,
|
||||
the system uses bytes per second.
|
||||
--io-maxbandwidth and --io-maxiops are mutually exclusive options.
|
||||
--io-maxiops=0 Maximum IO per second limit for the system drive (Windows only).
|
||||
--io-maxbandwidth and --io-maxiops are mutually exclusive options.
|
||||
--memory-reservation="" Memory soft limit
|
||||
--memory-swap="" A positive integer equal to memory plus swap. Specify -1 to enable unlimited swap.
|
||||
--memory-swappiness="" Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100.
|
||||
--name="" Assign a name to the container
|
||||
--net="bridge" Connect a container to a network
|
||||
--io-maxiops uint Maximum IOps limit for the system drive (Windows only)
|
||||
--ip string Container IPv4 address (e.g. 172.30.100.104)
|
||||
--ip6 string Container IPv6 address (e.g. 2001:db8::33)
|
||||
--ipc string IPC namespace to use
|
||||
--isolation string Container isolation technology
|
||||
--kernel-memory string Kernel memory limit
|
||||
-l, --label value Set meta data on a container (default [])
|
||||
--label-file value Read in a line delimited file of labels (default [])
|
||||
--link value Add link to another container (default [])
|
||||
--link-local-ip value Container IPv4/IPv6 link-local addresses (default [])
|
||||
--log-driver string Logging driver for container
|
||||
--log-opt value Log driver options (default [])
|
||||
--mac-address string Container MAC address (e.g. 92:d0:c6:0a:29:33)
|
||||
-m, --memory string Memory limit
|
||||
--memory-reservation string Memory soft limit
|
||||
--memory-swap string Swap limit equal to memory plus swap: '-1' to enable unlimited swap
|
||||
--memory-swappiness int Tune container memory swappiness (0 to 100) (default -1).
|
||||
--name string Assign a name to the container
|
||||
--net string Connect a container to a network (default "default")
|
||||
'bridge': create a network stack on the default Docker bridge
|
||||
'none': no networking
|
||||
'container:<name|id>': reuse another container's network stack
|
||||
'host': use the Docker host network stack
|
||||
'<network-name>|<network-id>': connect to a user-defined network
|
||||
--net-alias=[] Add network-scoped alias for the container
|
||||
--oom-kill-disable Whether to disable OOM Killer for the container or not
|
||||
--oom-score-adj=0 Tune the host's OOM preferences for containers (accepts -1000 to 1000)
|
||||
-P, --publish-all Publish all exposed ports to random ports
|
||||
-p, --publish=[] Publish a container's port(s) to the host
|
||||
--pid="" PID namespace to use
|
||||
--pids-limit=-1 Tune container pids limit (set -1 for unlimited), kernel >= 4.3
|
||||
--net-alias value Add network-scoped alias for the container (default [])
|
||||
--no-healthcheck Disable any container-specified HEALTHCHECK
|
||||
--oom-kill-disable Disable OOM Killer
|
||||
--oom-score-adj int Tune host's OOM preferences (-1000 to 1000)
|
||||
--pid string PID namespace to use
|
||||
--pids-limit int Tune container pids limit (set -1 for unlimited)
|
||||
--privileged Give extended privileges to this container
|
||||
-p, --publish value Publish a container's port(s) to the host (default [])
|
||||
-P, --publish-all Publish all exposed ports to random ports
|
||||
--read-only Mount the container's root filesystem as read only
|
||||
--restart="no" Restart policy (no, on-failure[:max-retry], always, unless-stopped)
|
||||
--restart string Restart policy to apply when a container exits (default "no")
|
||||
Possible values are : no, on-failuer[:max-retry], always, unless-stopped
|
||||
--rm Automatically remove the container when it exits
|
||||
--runtime="" Name of the runtime to be used for that container
|
||||
--shm-size=[] Size of `/dev/shm`. The format is `<number><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=[] Security Options
|
||||
--sig-proxy=true Proxy received signals to the process
|
||||
--stop-signal="SIGTERM" Signal to stop a container
|
||||
--storage-opt=[] Set storage driver options per container
|
||||
--sysctl[=*[]*]] Configure namespaced kernel parameters at runtime
|
||||
-t, --tty Allocate a pseudo-TTY
|
||||
-u, --user="" Username or UID (format: <name|uid>[:<group|gid>])
|
||||
--userns="" Container user namespace
|
||||
--runtime string Runtime to use for this container
|
||||
--security-opt value Security Options (default [])
|
||||
--shm-size string Size of /dev/shm, default value is 64MB.
|
||||
The format is `<number><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.
|
||||
--sig-proxy Proxy received signals to the process (default true)
|
||||
--stop-signal string Signal to stop a container, SIGTERM by default (default "SIGTERM")
|
||||
--storage-opt value Set storage driver options per container (default [])
|
||||
--sysctl value Sysctl options (default map[])
|
||||
--tmpfs value Mount a tmpfs directory (default [])
|
||||
-t, --tty Allocate a pseudo-TTY
|
||||
--ulimit value Ulimit options (default [])
|
||||
-u, --user string Username or UID (format: <name|uid>[:<group|gid>])
|
||||
--userns string User namespace to use
|
||||
'host': Use the Docker host user namespace
|
||||
'': Use the Docker daemon user namespace specified by `--userns-remap` option.
|
||||
--ulimit=[] Ulimit options
|
||||
--uts="" UTS namespace to use
|
||||
-v, --volume=[host-src:]container-dest[:<options>]
|
||||
Bind mount a volume. The comma-delimited
|
||||
--uts string UTS namespace to use
|
||||
-v, --volume value Bind mount a volume (default []). The comma-delimited
|
||||
`options` are [rw|ro], [z|Z],
|
||||
[[r]shared|[r]slave|[r]private], and
|
||||
[nocopy]. The 'host-src' is an absolute path
|
||||
or a name value.
|
||||
--volume-driver="" Container's volume driver
|
||||
--volumes-from=[] Mount volumes from the specified container(s)
|
||||
-w, --workdir="" Working directory inside the container
|
||||
--volume-driver string Optional volume driver for the container
|
||||
--volumes-from value Mount volumes from the specified container(s) (default [])
|
||||
-w, --workdir string Working directory inside the container
|
||||
```
|
||||
|
||||
The `docker run` command first `creates` a writeable container layer over the
|
||||
specified image, and then `starts` it using the specified command. That is,
|
||||
|
|
|
@ -10,12 +10,15 @@ parent = "smn_cli"
|
|||
|
||||
# save
|
||||
|
||||
Usage: docker save [OPTIONS] IMAGE [IMAGE...]
|
||||
```markdown
|
||||
Usage: docker save [OPTIONS] IMAGE [IMAGE...]
|
||||
|
||||
Save one or more images to a tar archive (streamed to STDOUT by default)
|
||||
Save one or more images to a tar archive (streamed to STDOUT by default)
|
||||
|
||||
--help Print usage
|
||||
-o, --output="" Write to a file, instead of STDOUT
|
||||
Options:
|
||||
--help Print usage
|
||||
-o, --output string Write to a file, instead of STDOUT
|
||||
```
|
||||
|
||||
Produces a tarred repository to the standard output stream.
|
||||
Contains all parent layers, and all tags + versions, or specified `repo:tag`, for
|
||||
|
|
|
@ -10,17 +10,20 @@ parent = "smn_cli"
|
|||
|
||||
# search
|
||||
|
||||
Usage: docker search [OPTIONS] TERM
|
||||
```markdown
|
||||
Usage: docker search [OPTIONS] TERM
|
||||
|
||||
Search the Docker Hub for images
|
||||
Search the Docker Hub for images
|
||||
|
||||
--filter=[] Filter output based on these conditions:
|
||||
- is-automated=(true|false)
|
||||
- is-official=(true|false)
|
||||
- stars=<number> - image has at least 'number' stars
|
||||
--help Print usage
|
||||
--limit=25 Maximum returned search results
|
||||
--no-trunc Don't truncate output
|
||||
Options:
|
||||
-f, --filter value Filter output based on conditions provided (default [])
|
||||
- is-automated=(true|false)
|
||||
- is-official=(true|false)
|
||||
- stars=<number> - image has at least 'number' stars
|
||||
--help Print usage
|
||||
--limit int Max number of search results (default 25)
|
||||
--no-trunc Don't truncate output
|
||||
```
|
||||
|
||||
Search [Docker Hub](https://hub.docker.com) for images
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ parent = "smn_cli"
|
|||
# service create
|
||||
|
||||
```Markdown
|
||||
Usage: docker service create [OPTIONS] IMAGE [COMMAND] [ARG...]
|
||||
Usage: docker service create [OPTIONS] IMAGE [COMMAND] [ARG...]
|
||||
|
||||
Create a new service
|
||||
|
||||
|
@ -29,6 +29,7 @@ Options:
|
|||
--name string Service name
|
||||
--network value Network attachments (default [])
|
||||
-p, --publish value Publish a port as a node port (default [])
|
||||
--registry-auth Send registry authentication details to Swarm agents
|
||||
--replicas value Number of tasks (default none)
|
||||
--reserve-cpu value Reserve CPUs (default 0.000)
|
||||
--reserve-memory value Reserve Memory (default 0 B)
|
||||
|
|
|
@ -12,7 +12,7 @@ parent = "smn_cli"
|
|||
# service inspect
|
||||
|
||||
```Markdown
|
||||
Usage: docker service inspect [OPTIONS] SERVICE [SERVICE...]
|
||||
Usage: docker service inspect [OPTIONS] SERVICE [SERVICE...]
|
||||
|
||||
Display detailed information on one or more services
|
||||
|
||||
|
|
|
@ -12,8 +12,6 @@ parent = "smn_cli"
|
|||
# service ls
|
||||
|
||||
```Markdown
|
||||
docker service ls --help
|
||||
|
||||
Usage: docker service ls [OPTIONS]
|
||||
|
||||
List services
|
||||
|
|
|
@ -11,13 +11,14 @@ parent = "smn_cli"
|
|||
|
||||
# service scale
|
||||
|
||||
Usage: docker service scale SERVICE=REPLICAS [SERVICE=REPLICAS...]
|
||||
```markdown
|
||||
Usage: docker service scale SERVICE=REPLICAS [SERVICE=REPLICAS...]
|
||||
|
||||
Scale one or multiple services
|
||||
|
||||
Options:
|
||||
--help Print usage
|
||||
Scale one or multiple services
|
||||
|
||||
Options:
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
|
|
|
@ -53,8 +53,8 @@ bk658fpbex0d57cqcwoe3jthu redis.2 redis redis:3.0.6 Running 9 seconds Ru
|
|||
|
||||
The filtering flag (`-f` or `--filter`) format is a `key=value` pair. If there
|
||||
is more than one filter, then pass multiple flags (e.g. `--filter "foo=bar" --filter "bif=baz"`).
|
||||
Multiple filter flags are combined as an `OR` filter. For example,
|
||||
`-f type=custom -f type=builtin` returns both `custom` and `builtin` networks.
|
||||
Multiple filter flags are combined as an `OR` filter. For example,
|
||||
`-f name=redis.1 -f name=redis.7` returns both `redis.1` and `redis.7` tasks.
|
||||
|
||||
The currently supported filters are:
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ parent = "smn_cli"
|
|||
# service update
|
||||
|
||||
```Markdown
|
||||
Usage: docker service update [OPTIONS] SERVICE
|
||||
Usage: docker service update [OPTIONS] SERVICE
|
||||
|
||||
Update a service
|
||||
|
||||
|
@ -27,11 +27,11 @@ Options:
|
|||
-l, --label value Service labels (default [])
|
||||
--limit-cpu value Limit CPUs (default 0.000)
|
||||
--limit-memory value Limit Memory (default 0 B)
|
||||
--mode string Service mode (replicated or global) (default "replicated")
|
||||
-m, --mount value Attach a mount to the service
|
||||
--name string Service name
|
||||
--network value Network attachments (default [])
|
||||
-p, --publish value Publish a port as a node port (default [])
|
||||
--registry-auth Send registry authentication details to Swarm agents
|
||||
--replicas value Number of tasks (default none)
|
||||
--reserve-cpu value Reserve CPUs (default 0.000)
|
||||
--reserve-memory value Reserve Memory (default 0 B)
|
||||
|
|
|
@ -10,11 +10,14 @@ parent = "smn_cli"
|
|||
|
||||
# start
|
||||
|
||||
Usage: docker start [OPTIONS] CONTAINER [CONTAINER...]
|
||||
```markdown
|
||||
Usage: docker start [OPTIONS] CONTAINER [CONTAINER...]
|
||||
|
||||
Start one or more containers
|
||||
Start one or more stopped containers
|
||||
|
||||
-a, --attach Attach STDOUT/STDERR and forward signals
|
||||
--detach-keys Specify the escape key sequence used to detach a container
|
||||
--help Print usage
|
||||
-i, --interactive Attach container's STDIN
|
||||
Options:
|
||||
-a, --attach Attach STDOUT/STDERR and forward signals
|
||||
--detach-keys string Override the key sequence for detaching a container
|
||||
--help Print usage
|
||||
-i, --interactive Attach container's STDIN
|
||||
```
|
||||
|
|
|
@ -10,13 +10,16 @@ parent = "smn_cli"
|
|||
|
||||
# stats
|
||||
|
||||
Usage: docker stats [OPTIONS] [CONTAINER...]
|
||||
```markdown
|
||||
Usage: docker stats [OPTIONS] [CONTAINER...]
|
||||
|
||||
Display a live stream of one or more containers' resource usage statistics
|
||||
Display a live stream of container(s) resource usage statistics
|
||||
|
||||
-a, --all Show all containers (default shows just running)
|
||||
--help Print usage
|
||||
--no-stream Disable streaming stats and only pull the first result
|
||||
Options:
|
||||
-a, --all Show all containers (default shows just running)
|
||||
--help Print usage
|
||||
--no-stream Disable streaming stats and only pull the first result
|
||||
```
|
||||
|
||||
The `docker stats` command returns a live data stream for running containers. To limit data to one or more specific containers, specify a list of container names or ids separated by a space. You can specify a stopped container but stopped containers do not return any data.
|
||||
|
||||
|
|
|
@ -10,13 +10,15 @@ parent = "smn_cli"
|
|||
|
||||
# stop
|
||||
|
||||
Usage: docker stop [OPTIONS] CONTAINER [CONTAINER...]
|
||||
```markdown
|
||||
Usage: docker stop [OPTIONS] CONTAINER [CONTAINER...]
|
||||
|
||||
Stop a container by sending SIGTERM and then SIGKILL after a
|
||||
grace period
|
||||
Stop one or more running containers
|
||||
|
||||
--help Print usage
|
||||
-t, --time=10 Seconds to wait for stop before killing it
|
||||
Options:
|
||||
--help Print usage
|
||||
-t, --time int Seconds to wait for stop before killing it (default 10)
|
||||
```
|
||||
|
||||
The main process inside the container will receive `SIGTERM`, and after a grace
|
||||
period, `SIGKILL`.
|
||||
|
|
|
@ -11,17 +11,22 @@ parent = "smn_cli"
|
|||
|
||||
# swarm init
|
||||
|
||||
Usage: docker swarm init [OPTIONS]
|
||||
```markdown
|
||||
Usage: docker swarm init [OPTIONS]
|
||||
|
||||
Initialize a Swarm.
|
||||
Initialize a Swarm
|
||||
|
||||
Options:
|
||||
--auto-accept value Acceptance policy (default [worker,manager])
|
||||
--external-ca value Specifications of one or more certificate signing endpoints
|
||||
--force-new-cluster Force create a new cluster from current state.
|
||||
--help Print usage
|
||||
--listen-addr value Listen address (default 0.0.0.0:2377)
|
||||
--secret string Set secret value needed to accept nodes into cluster
|
||||
Options:
|
||||
--auto-accept value Auto acceptance policy (worker, manager or none)
|
||||
--cert-expiry duration Validity period for node certificates (default 2160h0m0s)
|
||||
--dispatcher-heartbeat duration Dispatcher heartbeat period (default 5s)
|
||||
--external-ca value Specifications of one or more certificate signing endpoints
|
||||
--force-new-cluster Force create a new cluster from current state.
|
||||
--help Print usage
|
||||
--listen-addr value Listen address (default 0.0.0.0:2377)
|
||||
--secret string Set secret value needed to accept nodes into cluster
|
||||
--task-history-limit int Task history retention limit (default 10)
|
||||
```
|
||||
|
||||
Initialize a Swarm cluster. The docker engine targeted by this command becomes a manager
|
||||
in the newly created one node Swarm cluster.
|
||||
|
@ -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
|
||||
```
|
||||
|
||||
### `--cert-expiry`
|
||||
|
||||
This flag sets the validity period for node certificates.
|
||||
|
||||
### `--dispatcher-heartbeat`
|
||||
|
||||
This flags sets the frequency with which nodes are told to use as a
|
||||
period to report their health.
|
||||
|
||||
### `--external-ca value`
|
||||
|
||||
This flag sets up the swarm to use an external CA to issue node certificates. The value takes
|
||||
|
@ -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
|
||||
|
||||
### `--task-history-limit`
|
||||
|
||||
This flag sets up task history retention limit.
|
||||
|
||||
## Related information
|
||||
|
||||
* [swarm join](swarm_join.md)
|
||||
|
|
|
@ -11,15 +11,18 @@ parent = "smn_cli"
|
|||
|
||||
# swarm join
|
||||
|
||||
Usage: docker swarm join [OPTIONS] HOST:PORT
|
||||
```markdown
|
||||
Usage: docker swarm join [OPTIONS] HOST:PORT
|
||||
|
||||
Join a Swarm as a node and/or manager.
|
||||
Join a Swarm as a node and/or manager
|
||||
|
||||
Options:
|
||||
--help Print usage
|
||||
--listen-addr value Listen address (default 0.0.0.0:2377)
|
||||
--manager Try joining as a manager.
|
||||
--secret string Secret for node acceptance
|
||||
Options:
|
||||
--ca-hash string Hash of the Root Certificate Authority certificate used for trusted join
|
||||
--help Print usage
|
||||
--listen-addr value Listen address (default 0.0.0.0:2377)
|
||||
--manager Try joining as a manager.
|
||||
--secret string Secret for node acceptance
|
||||
```
|
||||
|
||||
Join a node to a Swarm cluster. If the `--manager` flag is specified, the docker engine
|
||||
targeted by this command becomes a `manager`. If it is not specified, it becomes a `worker`.
|
||||
|
@ -47,14 +50,18 @@ dkp8vy1dq1kxleu9g4u78tlag worker1 Accepted Ready Active Reachab
|
|||
dvfxp4zseq4s0rih1selh0d20 * manager1 Accepted Ready Active Reachable Yes
|
||||
```
|
||||
|
||||
### `--manager`
|
||||
### `--ca-hash`
|
||||
|
||||
Joins the node as a manager
|
||||
Hash of the Root Certificate Authority certificate used for trusted join.
|
||||
|
||||
### `--listen-addr value`
|
||||
|
||||
The node listens for inbound Swarm manager traffic on this IP:PORT
|
||||
|
||||
### `--manager`
|
||||
|
||||
Joins the node as a manager
|
||||
|
||||
### `--secret string`
|
||||
|
||||
Secret value required for nodes to join the swarm
|
||||
|
|
|
@ -11,12 +11,15 @@ parent = "smn_cli"
|
|||
|
||||
# swarm leave
|
||||
|
||||
Usage: docker swarm leave
|
||||
```markdown
|
||||
Usage: docker swarm leave [OPTIONS]
|
||||
|
||||
Leave a Swarm swarm.
|
||||
Leave a Swarm
|
||||
|
||||
Options:
|
||||
--help Print usage
|
||||
Options:
|
||||
--force Force leave ignoring warnings.
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
This command causes the node to leave the swarm.
|
||||
|
||||
|
|
|
@ -11,17 +11,20 @@ parent = "smn_cli"
|
|||
|
||||
# swarm update
|
||||
|
||||
Usage: docker swarm update [OPTIONS]
|
||||
```markdown
|
||||
Usage: docker swarm update [OPTIONS]
|
||||
|
||||
Update the Swarm.
|
||||
Update the Swarm
|
||||
|
||||
Options:
|
||||
--auto-accept value Auto acceptance policy (worker, manager or none)
|
||||
--external-ca value Specifications of one or more certificate signing endpoints
|
||||
--dispatcher-heartbeat duration Dispatcher heartbeat period (default 5s)
|
||||
--help Print usage
|
||||
--secret string Set secret value needed to accept nodes into cluster
|
||||
--task-history-limit int Task history retention limit (default 10)
|
||||
Options:
|
||||
--auto-accept value Auto acceptance policy (worker, manager or none)
|
||||
--cert-expiry duration Validity period for node certificates (default 2160h0m0s)
|
||||
--dispatcher-heartbeat duration Dispatcher heartbeat period (default 5s)
|
||||
--external-ca value Specifications of one or more certificate signing endpoints
|
||||
--help Print usage
|
||||
--secret string Set secret value needed to accept nodes into cluster
|
||||
--task-history-limit int Task history retention limit (default 10)
|
||||
```
|
||||
|
||||
Updates a Swarm cluster with new parameter values. This command must target a manager node.
|
||||
|
||||
|
|
|
@ -10,11 +10,14 @@ parent = "smn_cli"
|
|||
|
||||
# tag
|
||||
|
||||
Usage: docker tag [OPTIONS] NAME[:TAG] NAME[:TAG]
|
||||
```markdown
|
||||
Usage: docker tag IMAGE[:TAG] IMAGE[:TAG]
|
||||
|
||||
Tag an image into a repository
|
||||
Tag an image into a repository
|
||||
|
||||
--help Print usage
|
||||
Options:
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
An image name is made up of slash-separated name components, optionally prefixed
|
||||
by a registry hostname. The hostname must comply with standard DNS rules, but
|
||||
|
|
|
@ -10,8 +10,11 @@ parent = "smn_cli"
|
|||
|
||||
# top
|
||||
|
||||
Usage: docker top [OPTIONS] CONTAINER [ps OPTIONS]
|
||||
```markdown
|
||||
Usage: docker top CONTAINER [ps OPTIONS]
|
||||
|
||||
Display the running processes of a container
|
||||
Display the running processes of a container
|
||||
|
||||
--help Print usage
|
||||
Options:
|
||||
--help Print usage
|
||||
```
|
||||
|
|
|
@ -10,11 +10,14 @@ parent = "smn_cli"
|
|||
|
||||
# unpause
|
||||
|
||||
Usage: docker unpause [OPTIONS] CONTAINER [CONTAINER...]
|
||||
```markdown
|
||||
Usage: docker unpause CONTAINER [CONTAINER...]
|
||||
|
||||
Unpause all processes within a container
|
||||
Unpause all processes within one or more containers
|
||||
|
||||
--help Print usage
|
||||
Options:
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
The `docker unpause` command uses the cgroups freezer to un-suspend all
|
||||
processes in a container.
|
||||
|
|
|
@ -10,22 +10,25 @@ parent = "smn_cli"
|
|||
|
||||
## update
|
||||
|
||||
Usage: docker update [OPTIONS] CONTAINER [CONTAINER...]
|
||||
```markdown
|
||||
Usage: docker update [OPTIONS] CONTAINER [CONTAINER...]
|
||||
|
||||
Update configuration of one or more containers
|
||||
Update configuration of one or more containers
|
||||
|
||||
--help=false Print usage
|
||||
--blkio-weight=0 Block IO (relative weight), between 10 and 1000
|
||||
--cpu-shares=0 CPU shares (relative weight)
|
||||
--cpu-period=0 Limit the CPU CFS (Completely Fair Scheduler) period
|
||||
--cpu-quota=0 Limit the CPU CFS (Completely Fair Scheduler) quota
|
||||
--cpuset-cpus="" CPUs in which to allow execution (0-3, 0,1)
|
||||
--cpuset-mems="" Memory nodes (MEMs) in which to allow execution (0-3, 0,1)
|
||||
-m, --memory="" Memory limit
|
||||
--memory-reservation="" Memory soft limit
|
||||
--memory-swap="" A positive integer equal to memory plus swap. Specify -1 to enable unlimited swap
|
||||
--kernel-memory="" Kernel memory limit: container must be stopped
|
||||
--restart Restart policy to apply when a container exits
|
||||
Options:
|
||||
--blkio-weight value Block IO (relative weight), between 10 and 1000
|
||||
--cpu-period int Limit CPU CFS (Completely Fair Scheduler) period
|
||||
--cpu-quota int Limit CPU CFS (Completely Fair Scheduler) quota
|
||||
-c, --cpu-shares int CPU shares (relative weight)
|
||||
--cpuset-cpus string CPUs in which to allow execution (0-3, 0,1)
|
||||
--cpuset-mems string MEMs in which to allow execution (0-3, 0,1)
|
||||
--help Print usage
|
||||
--kernel-memory string Kernel memory limit
|
||||
-m, --memory string Memory limit
|
||||
--memory-reservation string Memory soft limit
|
||||
--memory-swap string Swap limit equal to memory plus swap: '-1' to enable unlimited swap
|
||||
--restart string Restart policy to apply when a container exits
|
||||
```
|
||||
|
||||
The `docker update` command dynamically updates container configuration.
|
||||
You can use this command to prevent containers from consuming too many resources
|
||||
|
|
|
@ -10,12 +10,15 @@ parent = "smn_cli"
|
|||
|
||||
# version
|
||||
|
||||
Usage: docker version [OPTIONS]
|
||||
```markdown
|
||||
Usage: docker version [OPTIONS]
|
||||
|
||||
Show the Docker version information.
|
||||
Show the Docker version information
|
||||
|
||||
-f, --format="" Format the output using the given go template
|
||||
--help Print usage
|
||||
Options:
|
||||
-f, --format string Format the output using the given go template
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
By default, this will render all version information in an easy to read
|
||||
layout. If a format is specified, the given template will be executed instead.
|
||||
|
|
|
@ -10,15 +10,18 @@ parent = "smn_cli"
|
|||
|
||||
# volume create
|
||||
|
||||
Usage: docker volume create [OPTIONS]
|
||||
```markdown
|
||||
Usage: docker volume create [OPTIONS]
|
||||
|
||||
Create a volume
|
||||
Create a volume
|
||||
|
||||
-d, --driver=local Specify volume driver name
|
||||
--help Print usage
|
||||
--label=[] Set metadata for a volume
|
||||
--name= Specify volume name
|
||||
-o, --opt=map[] Set driver specific options
|
||||
Options:
|
||||
-d, --driver string Specify volume driver name (default "local")
|
||||
--help Print usage
|
||||
--label value Set metadata for a volume (default [])
|
||||
--name string Specify volume name
|
||||
-o, --opt value Set driver specific options (default map[])
|
||||
```
|
||||
|
||||
Creates a new volume that containers can consume and store data in. If a name is not specified, Docker generates a random name. You create a volume and then configure the container to use it, for example:
|
||||
|
||||
|
|
|
@ -10,12 +10,15 @@ parent = "smn_cli"
|
|||
|
||||
# volume inspect
|
||||
|
||||
Usage: docker volume inspect [OPTIONS] VOLUME [VOLUME...]
|
||||
```markdown
|
||||
Usage: docker volume inspect [OPTIONS] VOLUME [VOLUME...]
|
||||
|
||||
Display detailed information on one or more volumes
|
||||
Display detailed information on one or more volumes
|
||||
|
||||
-f, --format= Format the output using the given go template.
|
||||
--help Print usage
|
||||
Options:
|
||||
-f, --format string Format the output using the given go template
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
Returns information about a volume. By default, this command renders all results
|
||||
in a JSON array. You can specify an alternate format to execute a
|
||||
|
|
|
@ -10,16 +10,22 @@ parent = "smn_cli"
|
|||
|
||||
# volume ls
|
||||
|
||||
Usage: docker volume ls [OPTIONS]
|
||||
```markdown
|
||||
Usage: docker volume ls [OPTIONS]
|
||||
|
||||
List volumes
|
||||
List volumes
|
||||
|
||||
-f, --filter=[] Filter output based on these conditions:
|
||||
- dangling=<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
|
||||
Aliases:
|
||||
ls, list
|
||||
|
||||
Options:
|
||||
-f, --filter value Provide filter values (i.e. 'dangling=true') (default [])
|
||||
- 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.
|
||||
|
||||
|
|
|
@ -10,11 +10,17 @@ parent = "smn_cli"
|
|||
|
||||
# volume rm
|
||||
|
||||
Usage: docker volume rm [OPTIONS] VOLUME [VOLUME...]
|
||||
```markdown
|
||||
Usage: docker volume rm VOLUME [VOLUME]...
|
||||
|
||||
Remove a volume
|
||||
Remove a volume
|
||||
|
||||
--help Print usage
|
||||
Aliases:
|
||||
rm, remove
|
||||
|
||||
Options:
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
Removes one or more volumes. You cannot remove a volume that is in use by a container.
|
||||
|
||||
|
|
|
@ -10,8 +10,11 @@ parent = "smn_cli"
|
|||
|
||||
# wait
|
||||
|
||||
Usage: docker wait [OPTIONS] CONTAINER [CONTAINER...]
|
||||
```markdown
|
||||
Usage: docker wait CONTAINER [CONTAINER...]
|
||||
|
||||
Block until a container stops, then print its exit code.
|
||||
Block until a container stops, then print its exit code
|
||||
|
||||
--help Print usage
|
||||
Options:
|
||||
--help Print usage
|
||||
```
|
||||
|
|
Загрузка…
Ссылка в новой задаче