小言_互联网的博客

Docker管理命令应用(v19.03.15)

442人阅读  评论(0)

记录:366

场景:在CentOS 7.9操作系统上,Docker管理命令应用。

版本:

操作系统:CentOS 7.9

Docker版本:Docker 19.03.15

1.Docker常用操作

1.1下载镜像

命令格式:docker pull 镜像名称:镜像版本

命令实例:docker pull redis:6.2.8

解析:使用docker pull下载,从容器镜像仓库下载下载。

1.2查看镜像列表

命令格式:docker images [OPTIONS] [REPOSITORY[:TAG]]

命令实例:docker images

命令实例:docker images redis

命令实例:docker images redis:6.2.8

解析:查看本地仓库镜像列表。

1.3搜索镜像

命令格式:docker search [OPTIONS] 镜像名称关键字

命令实例:docker search httpd

解析:从Docker Hub中搜索镜像。

1.4创建容器

(1)docker create创建

创建容器:docker create --name redis-27013 -p 27013:6379 redis:6.2.8

解析:使用docker create创建容器,创建完成后不会立运行容器,需使用命令启动。

(2)docker run创建并运行

创建容器:docker run -dit --name redis-27012 -p 27012:6379 redis:6.2.8

解析:使用docker run创建容器,创建完成后会立即运行容器。

1.5查看容器列表

命令格式:docker ps [OPTIONS]

命令实例:docker ps

命令实例:docker ps -a

解析:默认展现正在运行容器;-a,各种状态都会展现。

1.6启动容器

命令格式:docker start [OPTIONS] CONTAINER [CONTAINER...]

命令格式:docker start 容器ID

命令实例:docker start 8073e0bd334c

解析:启动已经创建的完成的容器。

1.7停止容器

命令格式:docker stop [OPTIONS] CONTAINER [CONTAINER...]

命令格式:docker stop 容器ID

命令实例:docker stop 8073e0bd334c

解析:停止容器会返回容器ID。

1.8重启容器

命令格式:docker restart [OPTIONS] CONTAINER [CONTAINER...]

命令格式:docker restart 容器ID

命令实例:docker restart 8073e0bd334c

解析:重启容器会返回容器ID。

1.9进入容器

命令格式:docker exec [OPTIONS] CONTAINER COMMAND [ARG...]

命令格式:docker exec 容器ID 命令

命令实例:docker exec -it 8073e0bd334c /bin/bash

命令实例:docker exec -it 8073e0bd334c bash

命令实例:docker exec -it redis-27012 bash

退出容器:exit

解析:执行docker exec命令时,使用容器ID和容器名称都可以进入容器内部。

1.10查看容器基础信息

命令格式:docker inspect [OPTIONS] NAME|ID [NAME|ID...]

命令格式:docker inspect 容器ID

命令实例:docker inspect b28cd322912a

解析:以JSON格式返回容器的基础信息,比如容器的ID、状态、镜像等常见配置信息;比如容器与宿主机之间的网络、端口、文件目录、驱动等信息。

1.11更新容器配置

命令格式:docker update [OPTIONS] CONTAINER [CONTAINER...]

命令实例:docker update --cpus 1  b28cd322912a

解析:限制cpu数量为1。

1.12 kill容器

命令格式:docker kill [OPTIONS] CONTAINER [CONTAINER...]

命令格式:docker kill 容器ID

命令实例:docker kill b28cd322912a

解析:kill容器会返回容器ID。

1.13删除容器

命令格式:docker rm [OPTIONS] CONTAINER [CONTAINER...]

命令格式:docker rm 容器ID

命令实例:docker rm 8073e0bd334c

解析:删除容器会返回容器ID。

1.15删除镜像

命令格式:docker rmi [OPTIONS] IMAGE [IMAGE...]

命令格式:docker rmi 镜像ID

命令实例:docker rmi 83a5aeccc5e0

解析:删除容器会返回镜像ID,一个有容器正在运行的镜像不能删除。

1.16查看容器日志

命令格式:docker logs [OPTIONS] 容器ID

命令实例:docker logs -f 8073e0bd334c

解析:-f,对于正在运行的容器,会持续输出日志。

1.17容器和本地文件系统之间拷贝数据

(1)本地拷贝到容器内部

命令格式:docker cp [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATH

命令实例:docker cp /home/apps/workInLocal/hz.txt 8073e0bd334c:/home/workInDocker

(2)容器内部拷贝到本地

命令格式:docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH

命令实例:docker cp 8073e0bd334c:/home/workInDocker/hz.txt  /home/hz01.txt

1.18查看容器内部文件系统文件和目录变化

命令格式:docker diff [OPTIONS] 容器ID

命令实例:docker diff 3645454c4d2f

解析:看到容器内部的文件和目录变化,如果有的话。

1.19导出容器的文件系统

命令格式:docker export [OPTIONS] 容器ID

命令实例:docker export -o localFile 3645454c4d2f

解析:把容器内部文件系统导出到本地的一个文件。

1.20根据容器创建镜像

(1)创建镜像

命令格式:docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]

命令实例:docker commit 3645454c4d2f myredis:6.2.8.1

解析:根据一个已经在运行的容器,创建一个新的镜像。

(2)查看镜像

命令:docker images myredis

解析:可以看到镜像已经生成。

(3)应用镜像

创建容器:docker run -dit --name redis-27014 -p 27014:6379 myredis:6.2.8.1

解析:使用新创建的镜像myredis:6.2.8.1,创建容器

1.21查看镜像历史信息

命令格式:docker history [OPTIONS] IMAGE

命令实例:docker history -H httpd:2.4.54

解析:可以查看镜像包历史变更信息。

1.22查看docker信息

命令实例:docker info

解析:显示docker在系统侧的信息。包括docker管理的容器、镜像、驱动、插件、以及系统信息。

1.23暂停容器

命令格式:docker pause CONTAINER [CONTAINER...]

命令格式:docker pause 容器ID

命令实例:docker pause 94a43200c09e

解析:执行后容器状态为:Paused。

1.24查看容器与宿主机之间映射端口

命令格式:docker port CONTAINER [PRIVATE_PORT[/PROTO]]

命令格式:docker port 容器ID

命令实例:docker port 94a43200c09e

解析:查看容器和本地之间端口映射。

1.25重命名容器名称

命令格式:docker rename CONTAINER NEW_NAME

命令格式:docker rename 容器ID 新名称

命令实例:docker rename 94a43200c09e myredis-27014

解析:把容器名称重新命名为myredis-27014。

1.26把镜像保存为文件

命令格式:docker save [OPTIONS] IMAGE

命令实例:docker save -o myimg 22f0fd7102c4

解析:把镜像22f0fd7102c4保存到一个文件中。

1.27查看容器的实时统计信息

命令格式:docker stats [OPTIONS] 容器ID

命令实例:docker stats 3645454c4d2f

命令实例:docker stats

解析:查看容器统计信息,包括CPU、内存、网络IO、块IO、PID等信息的实时统计。

1.28镜像修改版本号

命令格式:docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]

命令实例:docker tag myredis:6.2.8.1 myredis:6.2.8.2

解析:镜像修改为版本号,只是tag变了,镜像ID、SIZE等其它字段不变。

1.29查看容器的进程信息

命令格式:docker top CONTAINER [ps OPTIONS]

命令实例:docker top 94a43200c09e

解析:查看容器的进程信息,包括UID、PID、CMD等。

1.30取消暂停

命令格式:docker unpause 容器ID

命令实例:docker unpause 94a43200c09e

解析:取消暂停,把容器的Paused状态变更为Up状态。

1.31查看docker版本

命令实例:docker version

解析:查看docker版本详细信息,包括引擎、容器、客户端等版本细节。

命令实例:docker --version

解析:只显示客户端版本信息。

1.32等待容器停止

命令格式:docker wait 容器ID

命令实例:docker wait 94a43200c09e

解析:容器停止时,能接收到返回值:0。

1.33登录Docker registry

登录本地搭建的harbor镜像仓库Registry。

命令格式:docker login [OPTIONS] [SERVER]

命令实例:docker login http://192.168.19.166:18021 -u admin -p Harbor12345

解析:http://192.168.19.166:18021是harbor服务器地址;-u是用户名;-p,指定密码。

1.34登出Docker registry

命令格式:docker logout [SERVER]

命令实例:docker logout

命令实例:docker logout http://192.168.19.166:18021

解析:默认是登出:Removing login credentials for https://index.docker.io/v1/。指定服务器和端口登出搭建的私有仓库。

1.35下载镜像(Harbor镜像仓库)

命令格式:docker pull [OPTIONS] NAME[:TAG|@DIGEST]

命令实例:docker pull 192.168.19.166:18021/library/redis-photon:v2.3.5

解析:192.168.19.166:18021,本地搭建的harbor镜像仓库;/library/redis-photon:v2.3.5是镜像仓库的实际镜像。

1.36上传镜像(Harbor镜像仓库)

(1)修改docker配置信息

修改命令:vi /etc/docker/daemon.json

修改内容:


  
  1. {
  2. "registry-mirrors":[ "http://192.168.19.166:18021"],
  3. "insecure-registries":[ "192.168.19.166:18021"]
  4. }

加载配置和重启docker:systemctl daemon-reload && systemctl restart docker

(2)先把本地镜像打标签

命令:docker tag redis:7.0.7 192.168.19.166:18021/library/redis:7.0.7

解析:先把镜像打标签

(3)命令行登录Docker registry(Harbor)

命令实例:docker login http://192.168.19.166:18021 -u admin -p Harbor12345

解析:http://192.168.19.166:18021是harbor服务器地址;-u是用户名;-p,指定密码。

(4)推送

命令实例:docker push 192.168.19.166:18021/library/redis:7.0.7

解析:默认对推送到docker.io/library/redis;指定推送。

(5)命令行登出Docker registry(Harbor)

命令实例:docker logout http://192.168.19.166:18021

解析:登出Docker registry(Harbor),否则一直有效。

2.Docker管理命令及参数明细

Docker管理命令,主要针对集群swarm方面操作。

2.1帮助命令docker --help

使用帮助命令docker --help,可以查看docker支持的全部命令。

命令明细[参数明细]:


  
  1. Usage: docker [OPTIONS] COMMAND
  2. A self-sufficient runtime for containers
  3. Options:
  4. --config string Location of client config files (default "/root/.docker")
  5. -c, --context string Name of the context to use to connect to the daemon (overrides DOCKER_HOST env var and default context set with "docker context use")
  6. -D, --debug Enable debug mode
  7. -H, --host list Daemon socket(s) to connect to
  8. -l, --log-level string Set the logging level ( "debug"| "info"| "warn"| "error"| "fatal") (default "info")
  9. --tls Use TLS; implied by --tlsverify
  10. --tlscacert string Trust certs signed only by this CA (default "/root/.docker/ca.pem")
  11. --tlscert string Path to TLS certificate file (default "/root/.docker/cert.pem")
  12. --tlskey string Path to TLS key file (default "/root/.docker/key.pem")
  13. --tlsverify Use TLS and verify the remote
  14. -v, --version Print version information and quit
  15. Management Commands:
  16. builder Manage builds
  17. config Manage Docker configs
  18. container Manage containers
  19. context Manage contexts
  20. engine Manage the docker engine
  21. image Manage images
  22. network Manage networks
  23. node Manage Swarm nodes
  24. plugin Manage plugins
  25. secret Manage Docker secrets
  26. service Manage services
  27. stack Manage Docker stacks
  28. swarm Manage Swarm
  29. system Manage Docker
  30. trust Manage trust on Docker images
  31. volume Manage volumes
  32. Commands:
  33. attach Attach local standard input, output, and error streams to a running container
  34. build Build an image from a Dockerfile
  35. commit Create a new image from a container 's changes
  36. cp Copy files/folders between a container and the local filesystem
  37. create Create a new container
  38. diff Inspect changes to files or directories on a container's filesystem
  39. events Get real time events from the server
  40. exec Run a command in a running container
  41. export Export a container 's filesystem as a tar archive
  42. history Show the history of an image
  43. images List images
  44. import Import the contents from a tarball to create a filesystem image
  45. info Display system-wide information
  46. inspect Return low-level information on Docker objects
  47. kill Kill one or more running containers
  48. load Load an image from a tar archive or STDIN
  49. login Log in to a Docker registry
  50. logout Log out from a Docker registry
  51. logs Fetch the logs of a container
  52. pause Pause all processes within one or more containers
  53. port List port mappings or a specific mapping for the container
  54. ps List containers
  55. pull Pull an image or a repository from a registry
  56. push Push an image or a repository to a registry
  57. rename Rename a container
  58. restart Restart one or more containers
  59. rm Remove one or more containers
  60. rmi Remove one or more images
  61. run Run a command in a new container
  62. save Save one or more images to a tar archive (streamed to STDOUT by default)
  63. search Search the Docker Hub for images
  64. start Start one or more stopped containers
  65. stats Display a live stream of container(s) resource usage statistics
  66. stop Stop one or more running containers
  67. tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
  68. top Display the running processes of a container
  69. unpause Unpause all processes within one or more containers
  70. update Update configuration of one or more containers
  71. version Show the Docker version information
  72. wait Block until one or more containers stop, then print their exit codes
  73. Run 'docker COMMAND -- help ' for more information on a command.

2.2帮助命令docker builder --help

命令明细[参数明细]:


  
  1. Usage: docker builder COMMAND
  2. Manage builds
  3. Commands:
  4. build Build an image from a Dockerfile
  5. prune Remove build cache
  6. Run 'docker builder COMMAND --help' for more information on a command.

2.2.1帮助命令docker builder build --help

命令明细[参数明细]:


  
  1. Usage: docker builder build [OPTIONS] PATH | URL | -
  2. Build an image from a Dockerfile
  3. Options:
  4. --add-host list Add a custom host-to-IP mapping (host:ip)
  5. --build-arg list Set build-time variables
  6. --cache-from strings Images to consider as cache sources
  7. --cgroup-parent string Optional parent cgroup for the container
  8. --compress Compress the build context using gzip
  9. --cpu-period int Limit the CPU CFS (Completely Fair Scheduler) period
  10. --cpu-quota int Limit the CPU CFS (Completely Fair Scheduler) quota
  11. -c, --cpu-shares int CPU shares (relative weight)
  12. --cpuset-cpus string CPUs in which to allow execution (0-3, 0,1)
  13. --cpuset-mems string MEMs in which to allow execution (0-3, 0,1)
  14. --disable-content-trust Skip image verification (default true)
  15. -f, --file string Name of the Dockerfile (Default is 'PATH/Dockerfile')
  16. --force-rm Always remove intermediate containers
  17. --iidfile string Write the image ID to the file
  18. --isolation string Container isolation technology
  19. --label list Set metadata for an image
  20. -m, --memory bytes Memory limit
  21. --memory-swap bytes Swap limit equal to memory plus swap: '-1' to enable unlimited swap
  22. --network string Set the networking mode for the RUN instructions during build (default "default")
  23. --no-cache Do not use cache when building the image
  24. -o, --output stringArray Output destination (format: type= local,dest=path)
  25. --platform string Set platform if server is multi-platform capable
  26. --progress string Set type of progress output (auto, plain, tty). Use plain to show container output (default "auto")
  27. --pull Always attempt to pull a newer version of the image
  28. -q, --quiet Suppress the build output and print image ID on success
  29. -- rm Remove intermediate containers after a successful build (default true)
  30. --secret stringArray Secret file to expose to the build (only if BuildKit enabled): id=mysecret,src=/local/secret
  31. --security-opt strings Security options
  32. --shm-size bytes Size of /dev/shm
  33. --squash Squash newly built layers into a single new layer
  34. --ssh stringArray SSH agent socket or keys to expose to the build (only if BuildKit enabled) (format: default|< id>[=<socket>|<key>[,<key>]])
  35. --stream Stream attaches to server to negotiate build context
  36. -t, --tag list Name and optionally a tag in the 'name:tag' format
  37. --target string Set the target build stage to build.
  38. -- ulimit ulimit Ulimit options (default [])

2.2.2帮助命令docker builder prune --help

命令明细[参数明细]:


  
  1. Usage: docker builder prune
  2. Remove build cache
  3. Options:
  4. -a, --all Remove all unused build cache, not just dangling ones
  5. --filter filter Provide filter values (e.g. 'until=24h')
  6. -f, --force Do not prompt for confirmation
  7. --keep-storage bytes Amount of disk space to keep for cache

2.3帮助命令docker config --help

命令明细[参数明细]:


  
  1. Usage: docker config COMMAND
  2. Manage Docker configs
  3. Commands:
  4. create Create a config from a file or STDIN
  5. inspect Display detailed information on one or more configs
  6. ls List configs
  7. rm Remove one or more configs
  8. Run 'docker config COMMAND --help' for more information on a command.

2.3.1帮助命令docker config create --help

命令明细[参数明细]:


  
  1. Usage: docker config create [OPTIONS] CONFIG file|-
  2. Create a config from a file or STDIN
  3. Options:
  4. -l, --label list Config labels
  5. --template-driver string Template driver

2.3.2帮助命令docker config inspect --help

命令明细[参数明细]:


  
  1. Usage: docker config inspect [OPTIONS] CONFIG [CONFIG...]
  2. Display detailed information on one or more configs
  3. Options:
  4. -f, --format string Format the output using the given Go template
  5. --pretty Print the information in a human friendly format

2.3.3帮助命令docker config ls --help

命令明细[参数明细]:


  
  1. Usage: docker config ls [OPTIONS]
  2. List configs
  3. Aliases:
  4. ls, list
  5. Options:
  6. -f, --filter filter Filter output based on conditions provided
  7. --format string Pretty- print configs using a Go template
  8. -q, --quiet Only display IDs

2.3.4帮助命令docker config rm --help

命令明细[参数明细]:


  
  1. Usage: docker config rm CONFIG [CONFIG...]
  2. Remove one or more configs
  3. Aliases:
  4. rm, remove

2.4帮助命令docker container

命令明细[参数明细]:


  
  1. Usage: docker container COMMAND
  2. Manage containers
  3. Commands:
  4. attach Attach local standard input, output, and error streams to a running container
  5. commit Create a new image from a container 's changes
  6. cp Copy files/folders between a container and the local filesystem
  7. create Create a new container
  8. diff Inspect changes to files or directories on a container's filesystem
  9. exec Run a command in a running container
  10. export Export a container 's filesystem as a tar archive
  11. inspect Display detailed information on one or more containers
  12. kill Kill one or more running containers
  13. logs Fetch the logs of a container
  14. ls List containers
  15. pause Pause all processes within one or more containers
  16. port List port mappings or a specific mapping for the container
  17. prune Remove all stopped containers
  18. rename Rename a container
  19. restart Restart one or more containers
  20. rm Remove one or more containers
  21. run Run a command in a new container
  22. start Start one or more stopped containers
  23. stats Display a live stream of container(s) resource usage statistics
  24. stop Stop one or more running containers
  25. top Display the running processes of a container
  26. unpause Unpause all processes within one or more containers
  27. update Update configuration of one or more containers
  28. wait Block until one or more containers stop, then print their exit codes
  29. Run 'docker container COMMAND -- help ' for more information on a command.

2.4.1帮助命令docker container attach --help

命令明细[参数明细]:


  
  1. Usage: docker container attach [OPTIONS] CONTAINER
  2. Attach local standard input, output, and error streams to a running container
  3. Options:
  4. --detach-keys string Override the key sequence for detaching a container
  5. --no-stdin Do not attach STDIN
  6. --sig-proxy Proxy all received signals to the process (default true)

2.4.2帮助命令docker container commit --help

命令明细[参数明细]:


  
  1. Usage: docker container commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]
  2. Create a new image from a container 's changes
  3. Options:
  4. -a, --author string Author (e.g., "John Hannibal Smith <hannibal@a-team.com>")
  5. -c, --change list Apply Dockerfile instruction to the created image
  6. -m, --message string Commit message
  7. -p, --pause Pause container during commit (default true)

2.4.3帮助命令docker container cp --help

命令明细[参数明细]:


  
  1. Usage: docker container cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|-
  2. docker cp [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATH
  3. Copy files/folders between a container and the local filesystem
  4. Use '-' as the source to read a tar archive from stdin
  5. and extract it to a directory destination in a container.
  6. Use '-' as the destination to stream a tar archive of a
  7. container source to stdout.
  8. Options:
  9. -a, --archive Archive mode (copy all uid/gid information)
  10. -L, --follow-link Always follow symbol link in SRC_PATH

2.4.4帮助命令docker container create --help

命令明细[参数明细]:


  
  1. Usage: docker container create [OPTIONS] IMAGE [COMMAND] [ARG...]
  2. Create a new container
  3. Options:
  4. --add-host list Add a custom host-to-IP mapping (host:ip)
  5. -a, --attach list Attach to STDIN, STDOUT or STDERR
  6. --blkio-weight uint16 Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)
  7. --blkio-weight-device list Block IO weight (relative device weight) (default [])
  8. --cap-add list Add Linux capabilities
  9. --cap-drop list Drop Linux capabilities
  10. --cgroup-parent string Optional parent cgroup for the container
  11. --cidfile string Write the container ID to the file
  12. --cpu-period int Limit CPU CFS (Completely Fair Scheduler) period
  13. --cpu-quota int Limit CPU CFS (Completely Fair Scheduler) quota
  14. --cpu-rt-period int Limit CPU real-time period in microseconds
  15. --cpu-rt-runtime int Limit CPU real-time runtime in microseconds
  16. -c, --cpu-shares int CPU shares (relative weight)
  17. --cpus decimal Number of CPUs
  18. --cpuset-cpus string CPUs in which to allow execution (0-3, 0,1)
  19. --cpuset-mems string MEMs in which to allow execution (0-3, 0,1)
  20. --device list Add a host device to the container
  21. --device-cgroup-rule list Add a rule to the cgroup allowed devices list
  22. --device-read-bps list Limit read rate (bytes per second) from a device (default [])
  23. --device-read-iops list Limit read rate (IO per second) from a device (default [])
  24. --device-write-bps list Limit write rate (bytes per second) to a device (default [])
  25. --device-write-iops list Limit write rate (IO per second) to a device (default [])
  26. --disable-content-trust Skip image verification (default true)
  27. --dns list Set custom DNS servers
  28. --dns-option list Set DNS options
  29. --dns-search list Set custom DNS search domains
  30. --domainname string Container NIS domain name
  31. --entrypoint string Overwrite the default ENTRYPOINT of the image
  32. -e, -- env list Set environment variables
  33. --env-file list Read in a file of environment variables
  34. --expose list Expose a port or a range of ports
  35. --gpus gpu-request GPU devices to add to the container ( 'all' to pass all GPUs)
  36. --group-add list Add additional groups to join
  37. --health-cmd string Command to run to check health
  38. --health-interval duration Time between running the check (ms|s|m|h) (default 0s)
  39. --health-retries int Consecutive failures needed to report unhealthy
  40. --health-start-period duration Start period for the container to initialize before starting health-retries countdown (ms|s|m|h) (default 0s)
  41. --health-timeout duration Maximum time to allow one check to run (ms|s|m|h) (default 0s)
  42. -- help Print usage
  43. -h, --hostname string Container host name
  44. --init Run an init inside the container that forwards signals and reaps processes
  45. -i, --interactive Keep STDIN open even if not attached
  46. --ip string IPv4 address (e.g., 172.30.100.104)
  47. --ip6 string IPv6 address (e.g., 2001:db8::33)
  48. --ipc string IPC mode to use
  49. --isolation string Container isolation technology
  50. --kernel-memory bytes Kernel memory limit
  51. -l, --label list Set meta data on a container
  52. --label-file list Read in a line delimited file of labels
  53. -- link list Add link to another container
  54. --link-local-ip list Container IPv4/IPv6 link-local addresses
  55. --log-driver string Logging driver for the container
  56. --log-opt list Log driver options
  57. --mac-address string Container MAC address (e.g., 92:d0:c6:0a:29:33)
  58. -m, --memory bytes Memory limit
  59. --memory-reservation bytes Memory soft limit
  60. --memory-swap bytes Swap limit equal to memory plus swap: '-1' to enable unlimited swap
  61. --memory-swappiness int Tune container memory swappiness (0 to 100) (default -1)
  62. --mount mount Attach a filesystem mount to the container
  63. --name string Assign a name to the container
  64. --network network Connect a container to a network
  65. --network-alias list Add network-scoped alias for the container
  66. --no-healthcheck Disable any container-specified HEALTHCHECK
  67. --oom-kill-disable Disable OOM Killer
  68. --oom-score-adj int Tune host 's OOM preferences (-1000 to 1000)
  69. --pid string PID namespace to use
  70. --pids-limit int Tune container pids limit (set -1 for unlimited)
  71. --platform string Set platform if server is multi-platform capable
  72. --privileged Give extended privileges to this container
  73. -p, --publish list Publish a container's port(s) to the host
  74. -P, --publish-all Publish all exposed ports to random ports
  75. --read-only Mount the container 's root filesystem as read only
  76. --restart string Restart policy to apply when a container exits (default "no")
  77. --rm Automatically remove the container when it exits
  78. --runtime string Runtime to use for this container
  79. --security-opt list Security Options
  80. --shm-size bytes Size of /dev/shm
  81. --stop-signal string Signal to stop a container (default "SIGTERM")
  82. --stop-timeout int Timeout (in seconds) to stop a container
  83. --storage-opt list Storage driver options for the container
  84. --sysctl map Sysctl options (default map[])
  85. --tmpfs list Mount a tmpfs directory
  86. -t, --tty Allocate a pseudo-TTY
  87. --ulimit ulimit Ulimit options (default [])
  88. -u, --user string Username or UID (format: <name|uid>[:<group|gid>])
  89. --userns string User namespace to use
  90. --uts string UTS namespace to use
  91. -v, --volume list Bind mount a volume
  92. --volume-driver string Optional volume driver for the container
  93. --volumes-from list Mount volumes from the specified container(s)
  94. -w, --workdir string Working directory inside the container

2.4.5帮助命令docker container diff --help

命令明细[参数明细]:


  
  1. Usage: docker container diff CONTAINER
  2. Inspect changes to files or directories on a container 's filesystem

2.4.6帮助命令docker container exec --help

命令明细[参数明细]:


  
  1. Usage: docker container exec [OPTIONS] CONTAINER COMMAND [ARG...]
  2. Run a command in a running container
  3. Options:
  4. -d, --detach Detached mode: run command in the background
  5. --detach-keys string Override the key sequence for detaching a container
  6. -e, -- env list Set environment variables
  7. -i, --interactive Keep STDIN open even if not attached
  8. --privileged Give extended privileges to the command
  9. -t, -- tty Allocate a pseudo-TTY
  10. -u, --user string Username or UID (format: <name|uid>[:<group|gid>])
  11. -w, --workdir string Working directory inside the container

2.4.7帮助命令docker container export --help

命令明细[参数明细]:


  
  1. Usage: docker container export [OPTIONS] CONTAINER
  2. Export a container 's filesystem as a tar archive
  3. Options:
  4. -o, --output string Write to a file, instead of STDOUT

2.4.8帮助命令docker container inspect --help

命令明细[参数明细]:


  
  1. Usage: docker container inspect [OPTIONS] CONTAINER [CONTAINER...]
  2. Display detailed information on one or more containers
  3. Options:
  4. -f, --format string Format the output using the given Go template
  5. -s, --size Display total file sizes

2.4.9帮助命令docker container kill --help

命令明细[参数明细]:


  
  1. Usage: docker container kill [OPTIONS] CONTAINER [CONTAINER...]
  2. Kill one or more running containers
  3. Options:
  4. -s, --signal string Signal to send to the container (default "KILL")

2.4.10帮助命令docker container logs --help

命令明细[参数明细]:


  
  1. Usage: docker container logs [OPTIONS] CONTAINER
  2. Fetch the logs of a container
  3. Options:
  4. --details Show extra details provided to logs
  5. -f, --follow Follow log output
  6. --since string Show logs since timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)
  7. -- tail string Number of lines to show from the end of the logs (default "all")
  8. -t, --timestamps Show timestamps
  9. --until string Show logs before a timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)

2.4.11帮助命令docker container ls --help

命令明细[参数明细]:


  
  1. Usage: docker container ls [OPTIONS]
  2. List containers
  3. Aliases:
  4. ls, ps, list
  5. Options:
  6. -a, --all Show all containers (default shows just running)
  7. -f, --filter filter Filter output based on conditions provided
  8. --format string Pretty- print containers using a Go template
  9. -n, --last int Show n last created containers (includes all states) (default -1)
  10. -l, --latest Show the latest created container (includes all states)
  11. --no-trunc Don 't truncate output
  12. -q, --quiet Only display numeric IDs
  13. -s, --size Display total file sizes

2.4.12帮助命令docker container pause --help

命令明细[参数明细]:


  
  1. Usage: docker container pause CONTAINER [CONTAINER...]
  2. Pause all processes within one or more containers

2.4.13帮助命令docker container port --help

命令明细[参数明细]:


  
  1. Usage: docker container port CONTAINER [PRIVATE_PORT[/PROTO]]
  2. List port mappings or a specific mapping for the container

2.4.14帮助命令docker container prune --help

命令明细[参数明细]:


  
  1. Usage: docker container prune [OPTIONS]
  2. Remove all stopped containers
  3. Options:
  4. --filter filter Provide filter values (e.g. 'until=<timestamp>')
  5. -f, --force Do not prompt for confirmation

2.4.15帮助命令docker container rename --help

命令明细[参数明细]:


  
  1. Usage: docker container rename CONTAINER NEW_NAME
  2. Rename a container

2.4.16帮助命令docker container restart --help

命令明细[参数明细]:


  
  1. Usage: docker container restart [OPTIONS] CONTAINER [CONTAINER...]
  2. Restart one or more containers
  3. Options:
  4. -t, --time int Seconds to wait for stop before killing the container (default 10)

2.4.17帮助命令docker container rm --help

命令明细[参数明细]:


  
  1. Usage: docker container rm [OPTIONS] CONTAINER [CONTAINER...]
  2. Remove one or more containers
  3. Options:
  4. -f, --force Force the removal of a running container (uses SIGKILL)
  5. -l, -- link Remove the specified link
  6. -v, --volumes Remove anonymous volumes associated with the container

2.4.18帮助命令docker container run --help

命令明细[参数明细]:


  
  1. Usage: docker container run [OPTIONS] IMAGE [COMMAND] [ARG...]
  2. Run a command in a new container
  3. Options:
  4. --add-host list Add a custom host-to-IP mapping (host:ip)
  5. -a, --attach list Attach to STDIN, STDOUT or STDERR
  6. --blkio-weight uint16 Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)
  7. --blkio-weight-device list Block IO weight (relative device weight) (default [])
  8. --cap-add list Add Linux capabilities
  9. --cap-drop list Drop Linux capabilities
  10. --cgroup-parent string Optional parent cgroup for the container
  11. --cidfile string Write the container ID to the file
  12. --cpu-period int Limit CPU CFS (Completely Fair Scheduler) period
  13. --cpu-quota int Limit CPU CFS (Completely Fair Scheduler) quota
  14. --cpu-rt-period int Limit CPU real-time period in microseconds
  15. --cpu-rt-runtime int Limit CPU real-time runtime in microseconds
  16. -c, --cpu-shares int CPU shares (relative weight)
  17. --cpus decimal Number of CPUs
  18. --cpuset-cpus string CPUs in which to allow execution (0-3, 0,1)
  19. --cpuset-mems string MEMs in which to allow execution (0-3, 0,1)
  20. -d, --detach Run container in background and print container ID
  21. --detach-keys string Override the key sequence for detaching a container
  22. --device list Add a host device to the container
  23. --device-cgroup-rule list Add a rule to the cgroup allowed devices list
  24. --device-read-bps list Limit read rate (bytes per second) from a device (default [])
  25. --device-read-iops list Limit read rate (IO per second) from a device (default [])
  26. --device-write-bps list Limit write rate (bytes per second) to a device (default [])
  27. --device-write-iops list Limit write rate (IO per second) to a device (default [])
  28. --disable-content-trust Skip image verification (default true)
  29. --dns list Set custom DNS servers
  30. --dns-option list Set DNS options
  31. --dns-search list Set custom DNS search domains
  32. --domainname string Container NIS domain name
  33. --entrypoint string Overwrite the default ENTRYPOINT of the image
  34. -e, -- env list Set environment variables
  35. --env-file list Read in a file of environment variables
  36. --expose list Expose a port or a range of ports
  37. --gpus gpu-request GPU devices to add to the container ( 'all' to pass all GPUs)
  38. --group-add list Add additional groups to join
  39. --health-cmd string Command to run to check health
  40. --health-interval duration Time between running the check (ms|s|m|h) (default 0s)
  41. --health-retries int Consecutive failures needed to report unhealthy
  42. --health-start-period duration Start period for the container to initialize before starting health-retries countdown (ms|s|m|h) (default 0s)
  43. --health-timeout duration Maximum time to allow one check to run (ms|s|m|h) (default 0s)
  44. -- help Print usage
  45. -h, --hostname string Container host name
  46. --init Run an init inside the container that forwards signals and reaps processes
  47. -i, --interactive Keep STDIN open even if not attached
  48. --ip string IPv4 address (e.g., 172.30.100.104)
  49. --ip6 string IPv6 address (e.g., 2001:db8::33)
  50. --ipc string IPC mode to use
  51. --isolation string Container isolation technology
  52. --kernel-memory bytes Kernel memory limit
  53. -l, --label list Set meta data on a container
  54. --label-file list Read in a line delimited file of labels
  55. -- link list Add link to another container
  56. --link-local-ip list Container IPv4/IPv6 link-local addresses
  57. --log-driver string Logging driver for the container
  58. --log-opt list Log driver options
  59. --mac-address string Container MAC address (e.g., 92:d0:c6:0a:29:33)
  60. -m, --memory bytes Memory limit
  61. --memory-reservation bytes Memory soft limit
  62. --memory-swap bytes Swap limit equal to memory plus swap: '-1' to enable unlimited swap
  63. --memory-swappiness int Tune container memory swappiness (0 to 100) (default -1)
  64. --mount mount Attach a filesystem mount to the container
  65. --name string Assign a name to the container
  66. --network network Connect a container to a network
  67. --network-alias list Add network-scoped alias for the container
  68. --no-healthcheck Disable any container-specified HEALTHCHECK
  69. --oom-kill-disable Disable OOM Killer
  70. --oom-score-adj int Tune host 's OOM preferences (-1000 to 1000)
  71. --pid string PID namespace to use
  72. --pids-limit int Tune container pids limit (set -1 for unlimited)
  73. --platform string Set platform if server is multi-platform capable
  74. --privileged Give extended privileges to this container
  75. -p, --publish list Publish a container's port(s) to the host
  76. -P, --publish-all Publish all exposed ports to random ports
  77. --read-only Mount the container 's root filesystem as read only
  78. --restart string Restart policy to apply when a container exits (default "no")
  79. --rm Automatically remove the container when it exits
  80. --runtime string Runtime to use for this container
  81. --security-opt list Security Options
  82. --shm-size bytes Size of /dev/shm
  83. --sig-proxy Proxy received signals to the process (default true)
  84. --stop-signal string Signal to stop a container (default "SIGTERM")
  85. --stop-timeout int Timeout (in seconds) to stop a container
  86. --storage-opt list Storage driver options for the container
  87. --sysctl map Sysctl options (default map[])
  88. --tmpfs list Mount a tmpfs directory
  89. -t, --tty Allocate a pseudo-TTY
  90. --ulimit ulimit Ulimit options (default [])
  91. -u, --user string Username or UID (format: <name|uid>[:<group|gid>])
  92. --userns string User namespace to use
  93. --uts string UTS namespace to use
  94. -v, --volume list Bind mount a volume
  95. --volume-driver string Optional volume driver for the container
  96. --volumes-from list Mount volumes from the specified container(s)
  97. -w, --workdir string

2.4.19帮助命令docker container start --help

命令明细[参数明细]:


  
  1. Usage: docker container start [OPTIONS] CONTAINER [CONTAINER...]
  2. Start one or more stopped containers
  3. Options:
  4. -a, --attach Attach STDOUT/STDERR and forward signals
  5. --checkpoint string Restore from this checkpoint
  6. --checkpoint-dir string Use a custom checkpoint storage directory
  7. --detach-keys string Override the key sequence for detaching a container
  8. -i, --interactive Attach container 's STDIN

2.4.20帮助命令docker container stats --help

命令明细[参数明细]:


  
  1. Usage: docker container stats [OPTIONS] [CONTAINER...]
  2. Display a live stream of container(s) resource usage statistics
  3. Options:
  4. -a, --all Show all containers (default shows just running)
  5. --format string Pretty- print images using a Go template
  6. --no-stream Disable streaming stats and only pull the first result
  7. --no-trunc Do not truncate output

2.4.21帮助命令docker container stop --help

命令明细[参数明细]:


  
  1. Usage: docker container stop [OPTIONS] CONTAINER [CONTAINER...]
  2. Stop one or more running containers
  3. Options:
  4. -t, --time int Seconds to wait for stop before killing it (default 10)

2.4.22帮助命令docker container top --help

命令明细[参数明细]:


  
  1. Usage: docker container top CONTAINER [ps OPTIONS]
  2. Display the running processes of a container

2.4.23帮助命令docker container unpause --help

命令明细[参数明细]:


  
  1. Usage: docker container unpause CONTAINER [CONTAINER...]
  2. Unpause all processes within one or more containers

2.4.24帮助命令docker container update --help

命令明细[参数明细]:


  
  1. Usage: docker container update [OPTIONS] CONTAINER [CONTAINER...]
  2. Update configuration of one or more containers
  3. Options:
  4. --blkio-weight uint16 Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0)
  5. --cpu-period int Limit CPU CFS (Completely Fair Scheduler) period
  6. --cpu-quota int Limit CPU CFS (Completely Fair Scheduler) quota
  7. --cpu-rt-period int Limit the CPU real-time period in microseconds
  8. --cpu-rt-runtime int Limit the CPU real-time runtime in microseconds
  9. -c, --cpu-shares int CPU shares (relative weight)
  10. --cpus decimal Number of CPUs
  11. --cpuset-cpus string CPUs in which to allow execution (0-3, 0,1)
  12. --cpuset-mems string MEMs in which to allow execution (0-3, 0,1)
  13. --kernel-memory bytes Kernel memory limit
  14. -m, --memory bytes Memory limit
  15. --memory-reservation bytes Memory soft limit
  16. --memory-swap bytes Swap limit equal to memory plus swap: '-1' to enable unlimited swap
  17. --pids-limit int Tune container pids limit ( set -1 for unlimited)
  18. --restart string Restart policy to apply when a container exits

2.4.25帮助命令docker container wait --help

命令明细[参数明细]:


  
  1. Usage: docker container wait CONTAINER [CONTAINER...]
  2. Block until one or more containers stop, then print their exit codes

2.5帮助命令docker context --help

命令明细[参数明细]:


  
  1. Usage: docker context COMMAND
  2. Manage contexts
  3. Commands:
  4. create Create a context
  5. export Export a context to a tar or kubeconfig file
  6. import Import a context from a tar or zip file
  7. inspect Display detailed information on one or more contexts
  8. ls List contexts
  9. rm Remove one or more contexts
  10. update Update a context
  11. use Set the current docker context
  12. Run 'docker context COMMAND --help' for more information on a command.

2.5.1帮助命令docker context create --help

命令明细[参数明细]:


  
  1. Usage: docker context create [OPTIONS] CONTEXT
  2. Create a context
  3. Docker endpoint config:
  4. NAME DESCRIPTION
  5. from Copy named context 's Docker endpoint configuration
  6. host Docker endpoint on which to connect
  7. ca Trust certs signed only by this CA
  8. cert Path to TLS certificate file
  9. key Path to TLS key file
  10. skip-tls-verify Skip TLS certificate validation
  11. Kubernetes endpoint config:
  12. NAME DESCRIPTION
  13. from Copy named context's Kubernetes endpoint configuration
  14. config-file Path to a Kubernetes config file
  15. context-override Overrides the context set in the kubernetes config file
  16. namespace-override Overrides the namespace set in the kubernetes config file
  17. Example:
  18. $ docker context create my-context --description "some description" --docker "host=tcp://myserver:2376,ca=~/ca-file,cert=~/cert-file,key=~/key-file"
  19. Options:
  20. --default-stack-orchestrator string Default orchestrator for stack operations to use with this context (swarm|kubernetes|all)
  21. --description string Description of the context
  22. --docker stringToString set the docker endpoint (default [])
  23. --from string create context from a named context
  24. --kubernetes stringToString set the kubernetes endpoint (default [])

2.5.2帮助命令docker context export --help

命令明细[参数明细]:


  
  1. Usage: docker context export [OPTIONS] CONTEXT [FILE|-]
  2. Export a context to a tar or kubeconfig file
  3. Options:
  4. --kubeconfig Export as a kubeconfig file

2.5.3帮助命令docker context import --help

命令明细[参数明细]:


  
  1. Usage: docker context import CONTEXT FILE|-
  2. Import a context from a tar or zip file

2.5.4帮助命令docker context inspect --help

命令明细[参数明细]:


  
  1. Usage: docker context inspect [OPTIONS] [CONTEXT] [CONTEXT...]
  2. Display detailed information on one or more contexts
  3. Options:
  4. -f, --format string Format the output using the given Go template

2.5.5帮助命令docker context ls --help

命令明细[参数明细]:


  
  1. Usage: docker context ls [OPTIONS]
  2. List contexts
  3. Aliases:
  4. ls, list
  5. Options:
  6. --format string Pretty- print contexts using a Go template
  7. -q, --quiet Only show context names

2.5.6帮助命令docker context rm --help

命令明细[参数明细]:


  
  1. Usage: docker context rm CONTEXT [CONTEXT...]
  2. Remove one or more contexts
  3. Aliases:
  4. rm, remove
  5. Options:
  6. -f, --force Force the removal of a context in use

2.5.7帮助命令docker context update --help

命令明细[参数明细]:


  
  1. Usage: docker context update [OPTIONS] CONTEXT
  2. Update a context
  3. Docker endpoint config:
  4. NAME DESCRIPTION
  5. from Copy named context 's Docker endpoint configuration
  6. host Docker endpoint on which to connect
  7. ca Trust certs signed only by this CA
  8. cert Path to TLS certificate file
  9. key Path to TLS key file
  10. skip-tls-verify Skip TLS certificate validation
  11. Kubernetes endpoint config:
  12. NAME DESCRIPTION
  13. from Copy named context's Kubernetes endpoint configuration
  14. config-file Path to a Kubernetes config file
  15. context-override Overrides the context set in the kubernetes config file
  16. namespace-override Overrides the namespace set in the kubernetes config file
  17. Example:
  18. $ docker context update my-context --description "some description" --docker "host=tcp://myserver:2376,ca=~/ca-file,cert=~/cert-file,key=~/key-file"
  19. Options:
  20. --default-stack-orchestrator string Default orchestrator for stack operations to use with this context (swarm|kubernetes|all)
  21. --description string Description of the context
  22. --docker stringToString set the docker endpoint (default [])
  23. --kubernetes stringToString set the kubernetes endpoint (default [])

2.5.8帮助命令docker context use --help

命令明细[参数明细]:


  
  1. Usage: docker context use CONTEXT
  2. Set the current docker context

2.6帮助命令docker engine --help

命令明细[参数明细]:


  
  1. Usage: docker engine COMMAND
  2. Manage the docker engine
  3. Commands:
  4. activate Activate Enterprise Edition
  5. check Check for available engine updates
  6. update Update a local engine
  7. Run 'docker engine COMMAND --help' for more information on a command.

2.6.1帮助命令docker engine activate --help

命令明细[参数明细]:


  
  1. Usage: docker engine activate [OPTIONS]
  2. Activate Enterprise Edition.
  3. With this command you may apply an existing Docker enterprise license, or
  4. interactively download one from Docker. In the interactive exchange, you can
  5. sign up for a new trial, or download an existing license. If you are
  6. currently running a Community Edition engine, the daemon will be updated to
  7. the Enterprise Edition Docker engine with additional capabilities and long
  8. term support.
  9. For more information about different Docker Enterprise license types visit
  10. https://www.docker.com/licenses
  11. For non-interactive scriptable deployments, download your license from
  12. https://hub.docker.com/ then specify the file with the '--license' flag.
  13. Options:
  14. --containerd string override default location of containerd endpoint
  15. --display-only only display license information and exit
  16. --engine-image string Specify engine image
  17. --format string Pretty- print licenses using a Go template
  18. --license string License File
  19. --quiet Only display available licenses by ID
  20. --registry-prefix string Override the default location where engine images are pulled (default "docker.io/store/docker")
  21. --version string Specify engine version (default is to use currently running version)

2.6.2帮助命令docker engine check --help

命令明细[参数明细]:


  
  1. Usage: docker engine check [OPTIONS]
  2. Check for available engine updates
  3. Options:
  4. --containerd string override default location of containerd endpoint
  5. --downgrades Report downgrades (default omits older versions)
  6. --engine-image string Specify engine image (default uses the same image as currently running)
  7. --format string Pretty- print updates using a Go template
  8. --pre-releases Include pre-release versions
  9. -q, --quiet Only display available versions
  10. --registry-prefix string Override the existing location where engine images are pulled (default "docker.io/store/docker")
  11. --upgrades Report available upgrades (default true)

2.6.3帮助命令docker engine update --help

命令明细[参数明细]:


  
  1. Usage: docker engine update [OPTIONS]
  2. Update a local engine
  3. Options:
  4. --containerd string override default location of containerd endpoint
  5. --engine-image string Specify engine image (default uses the same image as currently running)
  6. --registry-prefix string Override the current location where engine images are pulled (default "docker.io/store/docker")
  7. --version string Specify engine version

2.7帮助命令docker image --help

命令明细[参数明细]:


  
  1. Usage: docker image COMMAND
  2. Manage images
  3. Commands:
  4. build Build an image from a Dockerfile
  5. history Show the history of an image
  6. import Import the contents from a tarball to create a filesystem image
  7. inspect Display detailed information on one or more images
  8. load Load an image from a tar archive or STDIN
  9. ls List images
  10. prune Remove unused images
  11. pull Pull an image or a repository from a registry
  12. push Push an image or a repository to a registry
  13. rm Remove one or more images
  14. save Save one or more images to a tar archive (streamed to STDOUT by default)
  15. tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
  16. Run 'docker image COMMAND --help' for more information on a command.

2.7.1帮助命令docker image build --help

命令明细[参数明细]:


  
  1. Usage: docker image build [OPTIONS] PATH | URL | -
  2. Build an image from a Dockerfile
  3. Options:
  4. --add-host list Add a custom host-to-IP mapping (host:ip)
  5. --build-arg list Set build-time variables
  6. --cache-from strings Images to consider as cache sources
  7. --cgroup-parent string Optional parent cgroup for the container
  8. --compress Compress the build context using gzip
  9. --cpu-period int Limit the CPU CFS (Completely Fair Scheduler) period
  10. --cpu-quota int Limit the CPU CFS (Completely Fair Scheduler) quota
  11. -c, --cpu-shares int CPU shares (relative weight)
  12. --cpuset-cpus string CPUs in which to allow execution (0-3, 0,1)
  13. --cpuset-mems string MEMs in which to allow execution (0-3, 0,1)
  14. --disable-content-trust Skip image verification (default true)
  15. -f, --file string Name of the Dockerfile (Default is 'PATH/Dockerfile')
  16. --force-rm Always remove intermediate containers
  17. --iidfile string Write the image ID to the file
  18. --isolation string Container isolation technology
  19. --label list Set metadata for an image
  20. -m, --memory bytes Memory limit
  21. --memory-swap bytes Swap limit equal to memory plus swap: '-1' to enable unlimited swap
  22. --network string Set the networking mode for the RUN instructions during build (default "default")
  23. --no-cache Do not use cache when building the image
  24. -o, --output stringArray Output destination (format: type= local,dest=path)
  25. --platform string Set platform if server is multi-platform capable
  26. --progress string Set type of progress output (auto, plain, tty). Use plain to show container output (default "auto")
  27. --pull Always attempt to pull a newer version of the image
  28. -q, --quiet Suppress the build output and print image ID on success
  29. -- rm Remove intermediate containers after a successful build (default true)
  30. --secret stringArray Secret file to expose to the build (only if BuildKit enabled): id=mysecret,src=/local/secret
  31. --security-opt strings Security options
  32. --shm-size bytes Size of /dev/shm
  33. --squash Squash newly built layers into a single new layer
  34. --ssh stringArray SSH agent socket or keys to expose to the build (only if BuildKit enabled) (format: default|< id>[=<socket>|<key>[,<key>]])
  35. --stream Stream attaches to server to negotiate build context
  36. -t, --tag list Name and optionally a tag in the 'name:tag' format
  37. --target string Set the target build stage to build.
  38. -- ulimit ulimit Ulimit options (default [])

2.7.2帮助命令docker image history --help

命令明细[参数明细]:


  
  1. Usage: docker image history [OPTIONS] IMAGE
  2. Show the history of an image
  3. Options:
  4. --format string Pretty- print images using a Go template
  5. -H, --human Print sizes and dates in human readable format (default true)
  6. --no-trunc Don 't truncate output
  7. -q, --quiet Only show numeric IDs

2.7.3帮助命令docker image import --help

命令明细[参数明细]:


  
  1. Usage: docker image import [OPTIONS] file|URL|- [REPOSITORY[:TAG]]
  2. Import the contents from a tarball to create a filesystem image
  3. Options:
  4. -c, --change list Apply Dockerfile instruction to the created image
  5. -m, --message string Set commit message for imported image
  6. --platform string Set platform if server is multi-platform capable

2.7.4帮助命令docker image inspect --help

命令明细[参数明细]:


  
  1. Usage: docker image inspect [OPTIONS] IMAGE [IMAGE...]
  2. Display detailed information on one or more images
  3. Options:
  4. -f, --format string Format the output using the given Go template

2.7.5帮助命令docker image load --help

命令明细[参数明细]:


  
  1. Usage: docker image load [OPTIONS]
  2. Load an image from a tar archive or STDIN
  3. Options:
  4. -i, --input string Read from tar archive file, instead of STDIN
  5. -q, --quiet Suppress the load output

2.7.6帮助命令docker image ls --help

命令明细[参数明细]:


  
  1. Usage: docker image ls [OPTIONS] [REPOSITORY[:TAG]]
  2. List images
  3. Aliases:
  4. ls, images, list
  5. Options:
  6. -a, --all Show all images (default hides intermediate images)
  7. --digests Show digests
  8. -f, --filter filter Filter output based on conditions provided
  9. --format string Pretty- print images using a Go template
  10. --no-trunc Don 't truncate output
  11. -q, --quiet Only show numeric IDs

2.7.7帮助命令docker image prune --help

命令明细[参数明细]:


  
  1. Usage: docker image prune [OPTIONS]
  2. Remove unused images
  3. Options:
  4. -a, --all Remove all unused images, not just dangling ones
  5. --filter filter Provide filter values (e.g. 'until=<timestamp>')
  6. -f, --force Do not prompt for confirmation

2.7.8帮助命令docker image pull --help

命令明细[参数明细]:


  
  1. Usage: docker image pull [OPTIONS] NAME[:TAG|@DIGEST]
  2. Pull an image or a repository from a registry
  3. Options:
  4. -a, --all-tags Download all tagged images in the repository
  5. --disable-content-trust Skip image verification (default true)
  6. --platform string Set platform if server is multi-platform capable
  7. -q, --quiet Suppress verbose output

2.7.9帮助命令docker image push --help

命令明细[参数明细]:


  
  1. Usage: docker image push [OPTIONS] NAME[:TAG]
  2. Push an image or a repository to a registry
  3. Options:
  4. --disable-content-trust Skip image signing (default true)

2.7.10帮助命令docker image rm --help

命令明细[参数明细]:


  
  1. Usage: docker image rm [OPTIONS] IMAGE [IMAGE...]
  2. Remove one or more images
  3. Aliases:
  4. rm, rmi, remove
  5. Options:
  6. -f, --force Force removal of the image
  7. --no-prune Do not delete untagged parents

2.7.11帮助命令docker image save --help

命令明细[参数明细]:


  
  1. Usage: docker image save [OPTIONS] IMAGE [IMAGE...]
  2. Save one or more images to a tar archive (streamed to STDOUT by default)
  3. Options:
  4. -o, --output string Write to a file, instead of STDOUT

2.7.12帮助命令docker image tag --help

命令明细[参数明细]:


  
  1. Usage: docker image tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]
  2. Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE

2.8帮助命令docker network --help

命令明细[参数明细]:


  
  1. Usage: docker network COMMAND
  2. Manage networks
  3. Commands:
  4. connect Connect a container to a network
  5. create Create a network
  6. disconnect Disconnect a container from a network
  7. inspect Display detailed information on one or more networks
  8. ls List networks
  9. prune Remove all unused networks
  10. rm Remove one or more networks
  11. Run 'docker network COMMAND --help' for more information on a command.

2.8.1帮助命令docker network connect --help

命令明细[参数明细]:


  
  1. Usage: docker network connect [OPTIONS] NETWORK CONTAINER
  2. Connect a container to a network
  3. Options:
  4. -- alias strings Add network-scoped alias for the container
  5. --driver-opt strings driver options for the network
  6. --ip string IPv4 address (e.g., 172.30.100.104)
  7. --ip6 string IPv6 address (e.g., 2001:db8::33)
  8. -- link list Add link to another container
  9. --link-local-ip strings Add a link-local address for the container

2.8.2帮助命令docker network create --help

命令明细[参数明细]:


  
  1. Usage: docker network create [OPTIONS] NETWORK
  2. Create a network
  3. Options:
  4. --attachable Enable manual container attachment
  5. --aux-address map Auxiliary IPv4 or IPv6 addresses used by Network driver (default map[])
  6. --config-from string The network from which copying the configuration
  7. --config-only Create a configuration only network
  8. -d, --driver string Driver to manage the Network (default "bridge")
  9. --gateway strings IPv4 or IPv6 Gateway for the master subnet
  10. --ingress Create swarm routing-mesh network
  11. --internal Restrict external access to the network
  12. --ip-range strings Allocate container ip from a sub-range
  13. --ipam-driver string IP Address Management Driver (default "default")
  14. --ipam-opt map Set IPAM driver specific options (default map[])
  15. --ipv6 Enable IPv6 networking
  16. --label list Set metadata on a network
  17. -o, --opt map Set driver specific options (default map[])
  18. --scope string Control the network 's scope
  19. --subnet strings Subnet in CIDR format that represents a network segment

2.8.3帮助命令docker network disconnect --help

命令明细[参数明细]:


  
  1. Usage: docker network disconnect [OPTIONS] NETWORK CONTAINER
  2. Disconnect a container from a network
  3. Options:
  4. -f, --force Force the container to disconnect from a network

2.8.4帮助命令docker network inspect --help

命令明细[参数明细]:


  
  1. Usage: docker network inspect [OPTIONS] NETWORK [NETWORK...]
  2. Display detailed information on one or more networks
  3. Options:
  4. -f, --format string Format the output using the given Go template
  5. -v, --verbose Verbose output for diagnostics

2.8.5帮助命令docker network ls --help

命令明细[参数明细]:


  
  1. Usage: docker network ls [OPTIONS]
  2. List networks
  3. Aliases:
  4. ls, list
  5. Options:
  6. -f, --filter filter Provide filter values (e.g. 'driver=bridge')
  7. --format string Pretty- print networks using a Go template
  8. --no-trunc Do not truncate the output
  9. -q, --quiet Only display network IDs

2.8.6帮助命令docker network prune --help

命令明细[参数明细]:


  
  1. Usage: docker network prune [OPTIONS]
  2. Remove all unused networks
  3. Options:
  4. --filter filter Provide filter values (e.g. 'until=<timestamp>')
  5. -f, --force Do not prompt for confirmation

2.8.7帮助命令docker network rm --help

命令明细[参数明细]:


  
  1. Usage: docker network rm NETWORK [NETWORK...]
  2. Remove one or more networks
  3. Aliases:
  4. rm, remove

2.9帮助命令docker node --help  

命令明细[参数明细]:


  
  1. Usage: docker node COMMAND
  2. Manage Swarm nodes
  3. Commands:
  4. demote Demote one or more nodes from manager in the swarm
  5. inspect Display detailed information on one or more nodes
  6. ls List nodes in the swarm
  7. promote Promote one or more nodes to manager in the swarm
  8. ps List tasks running on one or more nodes, defaults to current node
  9. rm Remove one or more nodes from the swarm
  10. update Update a node
  11. Run 'docker node COMMAND --help' for more information on a command.

2.9.1帮助命令docker node demote --help

命令明细[参数明细]:


  
  1. Usage: docker node demote NODE [NODE...]
  2. Demote one or more nodes from manager in the swarm

2.9.2帮助命令docker node promote --help

命令明细[参数明细]:


  
  1. Usage: docker node promote NODE [NODE...]
  2. Promote one or more nodes to manager in the swarm

2.9.3帮助命令docker node ls --help

命令明细[参数明细]:


  
  1. Usage: docker node ls [OPTIONS]
  2. List nodes in the swarm
  3. Aliases:
  4. ls, list
  5. Options:
  6. -f, --filter filter Filter output based on conditions provided
  7. --format string Pretty- print nodes using a Go template
  8. -q, --quiet Only display IDs

2.9.4帮助命令docker node promote --help

命令明细[参数明细]:


  
  1. Usage: docker node promote NODE [NODE...]
  2. Promote one or more nodes to manager in the swarm

2.9.5帮助命令docker node ps --help

命令明细[参数明细]:


  
  1. Usage: docker node ps [OPTIONS] [NODE...]
  2. List tasks running on one or more nodes, defaults to current node
  3. Options:
  4. -f, --filter filter Filter output based on conditions provided
  5. --format string Pretty- print tasks using a Go template
  6. --no-resolve Do not map IDs to Names
  7. --no-trunc Do not truncate output
  8. -q, --quiet Only display task IDs

2.9.6帮助命令docker node rm --help

命令明细[参数明细]:


  
  1. Usage: docker node rm [OPTIONS] NODE [NODE...]
  2. Remove one or more nodes from the swarm
  3. Aliases:
  4. rm, remove
  5. Options:
  6. -f, --force Force remove a node from the swarm

2.9.7帮助命令docker node update --help

命令明细[参数明细]:


  
  1. Usage: docker node update [OPTIONS] NODE
  2. Update a node
  3. Options:
  4. --availability string Availability of the node ( "active"| "pause"| "drain")
  5. --label-add list Add or update a node label (key=value)
  6. --label-rm list Remove a node label if exists
  7. --role string Role of the node ( "worker"| "manager")

2.10帮助命令docker plugin --help

命令明细[参数明细]:


  
  1. Usage: docker plugin COMMAND
  2. Manage plugins
  3. Commands:
  4. create Create a plugin from a rootfs and configuration. Plugin data directory must contain config.json and rootfs directory.
  5. disable Disable a plugin
  6. enable Enable a plugin
  7. inspect Display detailed information on one or more plugins
  8. install Install a plugin
  9. ls List plugins
  10. push Push a plugin to a registry
  11. rm Remove one or more plugins
  12. set Change settings for a plugin
  13. upgrade Upgrade an existing plugin
  14. Run 'docker plugin COMMAND --help' for more information on a command.

2.10.1帮助命令docker plugin create --help

命令明细[参数明细]:


  
  1. Usage: docker plugin create [OPTIONS] PLUGIN PLUGIN-DATA-DIR
  2. Create a plugin from a rootfs and configuration. Plugin data directory must contain config.json and rootfs directory.
  3. Options:
  4. --compress Compress the context using gzip

2.10.2帮助命令docker plugin disable --help

命令明细[参数明细]:


  
  1. Usage: docker plugin disable [OPTIONS] PLUGIN
  2. Disable a plugin
  3. Options:
  4. -f, --force Force the disable of an active plugin

2.10.3帮助命令docker plugin enable --help

命令明细[参数明细]:


  
  1. Usage: docker plugin enable [OPTIONS] PLUGIN
  2. Enable a plugin
  3. Options:
  4. -- timeout int HTTP client timeout ( in seconds) (default 30)

2.10.4帮助命令docker plugin inspect --help

命令明细[参数明细]:


  
  1. Usage: docker plugin inspect [OPTIONS] PLUGIN [PLUGIN...]
  2. Display detailed information on one or more plugins
  3. Options:
  4. -f, --format string Format the output using the given Go template

2.10.5帮助命令docker plugin install --help

命令明细[参数明细]:


  
  1. Usage: docker plugin install [OPTIONS] PLUGIN [KEY=VALUE...]
  2. Install a plugin
  3. Options:
  4. -- alias string Local name for plugin
  5. -- disable Do not enable the plugin on install
  6. --disable-content-trust Skip image verification (default true)
  7. --grant-all-permissions Grant all permissions necessary to run the plugin

2.10.6帮助命令docker plugin ls --help

命令明细[参数明细]:


  
  1. Usage: docker plugin ls [OPTIONS]
  2. List plugins
  3. Aliases:
  4. ls, list
  5. Options:
  6. -f, --filter filter Provide filter values (e.g. 'enabled=true')
  7. --format string Pretty- print plugins using a Go template
  8. --no-trunc Don 't truncate output
  9. -q, --quiet Only display plugin IDs

2.10.7帮助命令docker plugin push --help

命令明细[参数明细]:


  
  1. Usage: docker plugin push [OPTIONS] PLUGIN[:TAG]
  2. Push a plugin to a registry
  3. Options:
  4. --disable-content-trust Skip image signing (default true)

2.10.8帮助命令docker plugin rm --help

命令明细[参数明细]:


  
  1. Usage: docker plugin rm [OPTIONS] PLUGIN [PLUGIN...]
  2. Remove one or more plugins
  3. Aliases:
  4. rm, remove
  5. Options:
  6. -f, --force Force the removal of an active plugin

2.10.9帮助命令docker plugin set --help

命令明细[参数明细]:


  
  1. Usage: docker plugin set PLUGIN KEY=VALUE [KEY=VALUE...]
  2. Change settings for a plugin

2.10.10帮助命令docker plugin upgrade --help

命令明细[参数明细]:


  
  1. Usage: docker plugin upgrade [OPTIONS] PLUGIN [REMOTE]
  2. Upgrade an existing plugin
  3. Options:
  4. --disable-content-trust Skip image verification (default true)
  5. --grant-all-permissions Grant all permissions necessary to run the plugin
  6. --skip-remote-check Do not check if specified remote plugin matches existing plugin image

2.11帮助命令docker secret --help

命令明细[参数明细]:


  
  1. Usage: docker secret COMMAND
  2. Manage Docker secrets
  3. Commands:
  4. create Create a secret from a file or STDIN as content
  5. inspect Display detailed information on one or more secrets
  6. ls List secrets
  7. rm Remove one or more secrets
  8. Run 'docker secret COMMAND --help' for more information on a command.

2.11.1帮助命令docker secret create --help

命令明细[参数明细]:


  
  1. Usage: docker secret create [OPTIONS] SECRET [file|-]
  2. Create a secret from a file or STDIN as content
  3. Options:
  4. -d, --driver string Secret driver
  5. -l, --label list Secret labels
  6. --template-driver string Template driver

2.11.2帮助命令docker secret inspect --help

命令明细[参数明细]:


  
  1. Usage: docker secret inspect [OPTIONS] SECRET [SECRET...]
  2. Display detailed information on one or more secrets
  3. Options:
  4. -f, --format string Format the output using the given Go template
  5. --pretty Print the information in a human friendly format

2.11.3帮助命令docker secret ls --help

命令明细[参数明细]:


  
  1. Usage: docker secret ls [OPTIONS]
  2. List secrets
  3. Aliases:
  4. ls, list
  5. Options:
  6. -f, --filter filter Filter output based on conditions provided
  7. --format string Pretty- print secrets using a Go template
  8. -q, --quiet Only display IDs

2.11.4帮助命令docker secret rm --help

命令明细[参数明细]:


  
  1. Usage: docker secret rm SECRET [SECRET...]
  2. Remove one or more secrets
  3. Aliases:
  4. rm, remove

2.12帮助命令docker service --help

命令明细[参数明细]:


  
  1. Usage: docker service COMMAND
  2. Manage services
  3. Commands:
  4. create Create a new service
  5. inspect Display detailed information on one or more services
  6. logs Fetch the logs of a service or task
  7. ls List services
  8. ps List the tasks of one or more services
  9. rm Remove one or more services
  10. rollback Revert changes to a service 's configuration
  11. scale Scale one or multiple replicated services
  12. update Update a service
  13. Run 'docker service COMMAND -- help ' for more information on a command.

2.12.1帮助命令docker service create --help

命令明细[参数明细]:


  
  1. Usage: docker service create [OPTIONS] IMAGE [COMMAND] [ARG...]
  2. Create a new service
  3. Options:
  4. --config config Specify configurations to expose to the service
  5. --constraint list Placement constraints
  6. --container-label list Container labels
  7. --credential-spec credential-spec Credential spec for managed service account (Windows only)
  8. -d, --detach Exit immediately instead of waiting for the service to converge
  9. --dns list Set custom DNS servers
  10. --dns-option list Set DNS options
  11. --dns-search list Set custom DNS search domains
  12. --endpoint-mode string Endpoint mode (vip or dnsrr) (default "vip")
  13. --entrypoint command Overwrite the default ENTRYPOINT of the image
  14. -e, -- env list Set environment variables
  15. --env-file list Read in a file of environment variables
  16. --generic-resource list User defined resources
  17. --group list Set one or more supplementary user groups for the container
  18. --health-cmd string Command to run to check health
  19. --health-interval duration Time between running the check (ms|s|m|h)
  20. --health-retries int Consecutive failures needed to report unhealthy
  21. --health-start-period duration Start period for the container to initialize before counting retries towards unstable (ms|s|m|h)
  22. --health-timeout duration Maximum time to allow one check to run (ms|s|m|h)
  23. --host list Set one or more custom host-to-IP mappings (host:ip)
  24. --hostname string Container hostname
  25. --init Use an init inside each service container to forward signals and reap processes
  26. --isolation string Service container isolation mode
  27. -l, --label list Service labels
  28. --limit-cpu decimal Limit CPUs
  29. --limit-memory bytes Limit Memory
  30. --log-driver string Logging driver for service
  31. --log-opt list Logging driver options
  32. --mode string Service mode (replicated or global) (default "replicated")
  33. --mount mount Attach a filesystem mount to the service
  34. --name string Service name
  35. --network network Network attachments
  36. --no-healthcheck Disable any container-specified HEALTHCHECK
  37. --no-resolve-image Do not query the registry to resolve image digest and supported platforms
  38. --placement-pref pref Add a placement preference
  39. -p, --publish port Publish a port as a node port
  40. -q, --quiet Suppress progress output
  41. --read-only Mount the container 's root filesystem as read only
  42. --replicas uint Number of tasks
  43. --replicas-max-per-node uint Maximum number of tasks per node (default 0 = unlimited)
  44. --reserve-cpu decimal Reserve CPUs
  45. --reserve-memory bytes Reserve Memory
  46. --restart-condition string Restart when condition is met ("none"|"on-failure"|"any") (default "any")
  47. --restart-delay duration Delay between restart attempts (ns|us|ms|s|m|h) (default 5s)
  48. --restart-max-attempts uint Maximum number of restarts before giving up
  49. --restart-window duration Window used to evaluate the restart policy (ns|us|ms|s|m|h)
  50. --rollback-delay duration Delay between task rollbacks (ns|us|ms|s|m|h) (default 0s)
  51. --rollback-failure-action string Action on rollback failure ("pause"|"continue") (default "pause")
  52. --rollback-max-failure-ratio float Failure rate to tolerate during a rollback (default 0)
  53. --rollback-monitor duration Duration after each task rollback to monitor for failure (ns|us|ms|s|m|h) (default 5s)
  54. --rollback-order string Rollback order ("start-first"|"stop-first") (default "stop-first")
  55. --rollback-parallelism uint Maximum number of tasks rolled back simultaneously (0 to roll back all at once) (default 1)
  56. --secret secret Specify secrets to expose to the service
  57. --stop-grace-period duration Time to wait before force killing a container (ns|us|ms|s|m|h) (default 10s)
  58. --stop-signal string Signal to stop the container
  59. --sysctl list Sysctl options
  60. -t, --tty Allocate a pseudo-TTY
  61. --update-delay duration Delay between updates (ns|us|ms|s|m|h) (default 0s)
  62. --update-failure-action string Action on update failure ("pause"|"continue"|"rollback") (default "pause")
  63. --update-max-failure-ratio float Failure rate to tolerate during an update (default 0)
  64. --update-monitor duration Duration after each task update to monitor for failure (ns|us|ms|s|m|h) (default 5s)
  65. --update-order string Update order ("start-first"|"stop-first") (default "stop-first")
  66. --update-parallelism uint Maximum number of tasks updated simultaneously (0 to update all at once) (default 1)
  67. -u, --user string Username or UID (format: <name|uid>[:<group|gid>])
  68. --with-registry-auth Send registry authentication details to swarm agents
  69. -w, --workdir string Working directory inside the container

2.12.2帮助命令docker service inspect --help

命令明细[参数明细]:


  
  1. Usage: docker service inspect [OPTIONS] SERVICE [SERVICE...]
  2. Display detailed information on one or more services
  3. Options:
  4. -f, --format string Format the output using the given Go template
  5. --pretty Print the information in a human friendly format

2.12.3帮助命令docker service logs --help

命令明细[参数明细]:


  
  1. Usage: docker service logs [OPTIONS] SERVICE|TASK
  2. Fetch the logs of a service or task
  3. Options:
  4. --details Show extra details provided to logs
  5. -f, --follow Follow log output
  6. --no-resolve Do not map IDs to Names in output
  7. --no-task-ids Do not include task IDs in output
  8. --no-trunc Do not truncate output
  9. --raw Do not neatly format logs
  10. --since string Show logs since timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)
  11. -- tail string Number of lines to show from the end of the logs (default "all")
  12. -t, --timestamps Show timestamps

2.12.4帮助命令docker service ls --help

命令明细[参数明细]:


  
  1. Usage: docker service ls [OPTIONS]
  2. List services
  3. Aliases:
  4. ls, list
  5. Options:
  6. -f, --filter filter Filter output based on conditions provided
  7. --format string Pretty- print services using a Go template
  8. -q, --quiet Only display IDs

2.12.5帮助命令docker service ps --help

命令明细[参数明细]:


  
  1. Usage: docker service ps [OPTIONS] SERVICE [SERVICE...]
  2. List the tasks of one or more services
  3. Options:
  4. -f, --filter filter Filter output based on conditions provided
  5. --format string Pretty- print tasks using a Go template
  6. --no-resolve Do not map IDs to Names
  7. --no-trunc Do not truncate output
  8. -q, --quiet Only display task IDs

2.12.6帮助命令docker service rm --help

命令明细[参数明细]:


  
  1. Usage: docker service rm SERVICE [SERVICE...]
  2. Remove one or more services
  3. Aliases:
  4. rm, remove

2.12.7帮助命令docker service rollback --help

命令明细[参数明细]:


  
  1. Usage: docker service rollback [OPTIONS] SERVICE
  2. Revert changes to a service 's configuration
  3. Options:
  4. -d, --detach Exit immediately instead of waiting for the service to converge
  5. -q, --quiet Suppress progress output

2.12.8帮助命令docker service scale --help

命令明细[参数明细]:


  
  1. Usage: docker service scale SERVICE=REPLICAS [SERVICE=REPLICAS...]
  2. Scale one or multiple replicated services
  3. Options:
  4. -d, --detach Exit immediately instead of waiting for the service to converge

2.12.9帮助命令docker service update --help

命令明细[参数明细]:


  
  1. Usage: docker service update [OPTIONS] SERVICE
  2. Update a service
  3. Options:
  4. --args command Service command args
  5. --config-add config Add or update a config file on a service
  6. --config-rm list Remove a configuration file
  7. --constraint-add list Add or update a placement constraint
  8. --constraint-rm list Remove a constraint
  9. --container-label-add list Add or update a container label
  10. --container-label-rm list Remove a container label by its key
  11. --credential-spec credential-spec Credential spec for managed service account (Windows only)
  12. -d, --detach Exit immediately instead of waiting for the service to converge
  13. --dns-add list Add or update a custom DNS server
  14. --dns-option-add list Add or update a DNS option
  15. --dns-option-rm list Remove a DNS option
  16. --dns-rm list Remove a custom DNS server
  17. --dns-search-add list Add or update a custom DNS search domain
  18. --dns-search-rm list Remove a DNS search domain
  19. --endpoint-mode string Endpoint mode (vip or dnsrr)
  20. --entrypoint command Overwrite the default ENTRYPOINT of the image
  21. --env-add list Add or update an environment variable
  22. --env-rm list Remove an environment variable
  23. --force Force update even if no changes require it
  24. --generic-resource-add list Add a Generic resource
  25. --generic-resource-rm list Remove a Generic resource
  26. --group-add list Add an additional supplementary user group to the container
  27. --group-rm list Remove a previously added supplementary user group from the container
  28. --health-cmd string Command to run to check health
  29. --health-interval duration Time between running the check (ms|s|m|h)
  30. --health-retries int Consecutive failures needed to report unhealthy
  31. --health-start-period duration Start period for the container to initialize before counting retries towards unstable (ms|s|m|h)
  32. --health-timeout duration Maximum time to allow one check to run (ms|s|m|h)
  33. --host-add list Add a custom host-to-IP mapping (host:ip)
  34. --host-rm list Remove a custom host-to-IP mapping (host:ip)
  35. --hostname string Container hostname
  36. --image string Service image tag
  37. --init Use an init inside each service container to forward signals and reap processes
  38. --isolation string Service container isolation mode
  39. --label-add list Add or update a service label
  40. --label-rm list Remove a label by its key
  41. --limit-cpu decimal Limit CPUs
  42. --limit-memory bytes Limit Memory
  43. --log-driver string Logging driver for service
  44. --log-opt list Logging driver options
  45. --mount-add mount Add or update a mount on a service
  46. --mount-rm list Remove a mount by its target path
  47. --network-add network Add a network
  48. --network-rm list Remove a network
  49. --no-healthcheck Disable any container-specified HEALTHCHECK
  50. --no-resolve-image Do not query the registry to resolve image digest and supported platforms
  51. --placement-pref-add pref Add a placement preference
  52. --placement-pref-rm pref Remove a placement preference
  53. --publish-add port Add or update a published port
  54. --publish-rm port Remove a published port by its target port
  55. -q, --quiet Suppress progress output
  56. --read-only Mount the container 's root filesystem as read only
  57. --replicas uint Number of tasks
  58. --replicas-max-per-node uint Maximum number of tasks per node (default 0 = unlimited)
  59. --reserve-cpu decimal Reserve CPUs
  60. --reserve-memory bytes Reserve Memory
  61. --restart-condition string Restart when condition is met ("none"|"on-failure"|"any")
  62. --restart-delay duration Delay between restart attempts (ns|us|ms|s|m|h)
  63. --restart-max-attempts uint Maximum number of restarts before giving up
  64. --restart-window duration Window used to evaluate the restart policy (ns|us|ms|s|m|h)
  65. --rollback Rollback to previous specification
  66. --rollback-delay duration Delay between task rollbacks (ns|us|ms|s|m|h)
  67. --rollback-failure-action string Action on rollback failure ("pause"|"continue")
  68. --rollback-max-failure-ratio float Failure rate to tolerate during a rollback
  69. --rollback-monitor duration Duration after each task rollback to monitor for failure (ns|us|ms|s|m|h)
  70. --rollback-order string Rollback order ("start-first"|"stop-first")
  71. --rollback-parallelism uint Maximum number of tasks rolled back simultaneously (0 to roll back all at once)
  72. --secret-add secret Add or update a secret on a service
  73. --secret-rm list Remove a secret
  74. --stop-grace-period duration Time to wait before force killing a container (ns|us|ms|s|m|h)
  75. --stop-signal string Signal to stop the container
  76. --sysctl-add list Add or update a Sysctl option
  77. --sysctl-rm list Remove a Sysctl option
  78. -t, --tty Allocate a pseudo-TTY
  79. --update-delay duration Delay between updates (ns|us|ms|s|m|h)
  80. --update-failure-action string Action on update failure ("pause"|"continue"|"rollback")
  81. --update-max-failure-ratio float Failure rate to tolerate during an update
  82. --update-monitor duration Duration after each task update to monitor for failure (ns|us|ms|s|m|h)
  83. --update-order string Update order ("start-first"|"stop-first")
  84. --update-parallelism uint Maximum number of tasks updated simultaneously (0 to update all at once)
  85. -u, --user string Username or UID (format: <name|uid>[:<group|gid>])
  86. --with-registry-auth Send registry authentication details to swarm agents
  87. -w, --workdir string Working directory inside the container

2.13帮助命令docker stack --help

命令明细[参数明细]:


  
  1. Usage: docker stack [OPTIONS] COMMAND
  2. Manage Docker stacks
  3. Options:
  4. --orchestrator string Orchestrator to use (swarm|kubernetes|all)
  5. Commands:
  6. deploy Deploy a new stack or update an existing stack
  7. ls List stacks
  8. ps List the tasks in the stack
  9. rm Remove one or more stacks
  10. services List the services in the stack
  11. Run 'docker stack COMMAND --help' for more information on a command.

2.13.1帮助命令docker stack deploy --help

命令明细[参数明细]:


  
  1. Usage: docker stack deploy [OPTIONS] STACK
  2. Deploy a new stack or update an existing stack
  3. Aliases:
  4. deploy, up
  5. Options:
  6. --bundle-file string Path to a Distributed Application Bundle file
  7. -c, --compose-file strings Path to a Compose file, or "-" to read from stdin
  8. --orchestrator string Orchestrator to use (swarm|kubernetes|all)
  9. --prune Prune services that are no longer referenced
  10. --resolve-image string Query the registry to resolve image digest and supported platforms ( "always"| "changed"| "never") (default "always")
  11. --with-registry-auth Send registry authentication details to Swarm agents

2.13.2帮助命令docker stack ls --help

命令明细[参数明细]:


  
  1. Usage: docker stack ls [OPTIONS]
  2. List stacks
  3. Aliases:
  4. ls, list
  5. Options:
  6. --format string Pretty- print stacks using a Go template
  7. --orchestrator string Orchestrator to use (swarm|kubernetes|all)

2.13.3帮助命令docker stack ps --help

命令明细[参数明细]:


  
  1. Usage: docker stack ps [OPTIONS] STACK
  2. List the tasks in the stack
  3. Options:
  4. -f, --filter filter Filter output based on conditions provided
  5. --format string Pretty- print tasks using a Go template
  6. --no-resolve Do not map IDs to Names
  7. --no-trunc Do not truncate output
  8. --orchestrator string Orchestrator to use (swarm|kubernetes|all)
  9. -q, --quiet Only display task IDs

2.13.4帮助命令docker stack rm --help

命令明细[参数明细]:


  
  1. Usage: docker stack rm [OPTIONS] STACK [STACK...]
  2. Remove one or more stacks
  3. Aliases:
  4. rm, remove, down
  5. Options:
  6. --orchestrator string Orchestrator to use (swarm|kubernetes|all)

2.13.5帮助命令docker stack services --help

命令明细[参数明细]:


  
  1. Usage: docker stack services [OPTIONS] STACK
  2. List the services in the stack
  3. Options:
  4. -f, --filter filter Filter output based on conditions provided
  5. --format string Pretty- print services using a Go template
  6. --orchestrator string Orchestrator to use (swarm|kubernetes|all)
  7. -q, --quiet Only display IDs

2.14帮助命令docker swarm --help

命令明细[参数明细]:


  
  1. Usage: docker swarm COMMAND
  2. Manage Swarm
  3. Commands:
  4. ca Display and rotate the root CA
  5. init Initialize a swarm
  6. join Join a swarm as a node and/or manager
  7. join-token Manage join tokens
  8. leave Leave the swarm
  9. unlock Unlock swarm
  10. unlock-key Manage the unlock key
  11. update Update the swarm
  12. Run 'docker swarm COMMAND --help' for more information on a command.

2.14.1帮助命令docker swarm ca --help

命令明细[参数明细]:


  
  1. Usage: docker swarm ca [OPTIONS]
  2. Display and rotate the root CA
  3. Options:
  4. --ca-cert pem-file Path to the PEM-formatted root CA certificate to use for the new cluster
  5. --ca-key pem-file Path to the PEM-formatted root CA key to use for the new cluster
  6. --cert-expiry duration Validity period for node certificates (ns|us|ms|s|m|h) (default 2160h0m0s)
  7. -d, --detach Exit immediately instead of waiting for the root rotation to converge
  8. --external-ca external-ca Specifications of one or more certificate signing endpoints
  9. -q, --quiet Suppress progress output
  10. --rotate Rotate the swarm CA - if no certificate or key are provided, new ones will be generated

2.14.2帮助命令docker swarm init --help

命令明细[参数明细]:


  
  1. Usage: docker swarm init [OPTIONS]
  2. Initialize a swarm
  3. Options:
  4. --advertise-addr string Advertised address (format: <ip|interface>[:port])
  5. --autolock Enable manager autolocking (requiring an unlock key to start a stopped manager)
  6. --availability string Availability of the node ( "active"| "pause"| "drain") (default "active")
  7. --cert-expiry duration Validity period for node certificates (ns|us|ms|s|m|h) (default 2160h0m0s)
  8. --data-path-addr string Address or interface to use for data path traffic (format: <ip|interface>)
  9. --data-path-port uint32 Port number to use for data path traffic (1024 - 49151). If no value is set or is set to 0, the default port
  10. (4789) is used.
  11. --default-addr-pool ipNetSlice default address pool in CIDR format (default [])
  12. --default-addr-pool-mask-length uint32 default address pool subnet mask length (default 24)
  13. --dispatcher-heartbeat duration Dispatcher heartbeat period (ns|us|ms|s|m|h) (default 5s)
  14. --external-ca external-ca Specifications of one or more certificate signing endpoints
  15. --force-new-cluster Force create a new cluster from current state
  16. --listen-addr node-addr Listen address (format: <ip|interface>[:port]) (default 0.0.0.0:2377)
  17. --max-snapshots uint Number of additional Raft snapshots to retain
  18. --snapshot-interval uint Number of log entries between Raft snapshots (default 10000)
  19. --task-history-limit int Task history retention limit (default 5)

2.14.3帮助命令docker swarm join --help

命令明细[参数明细]:


  
  1. Usage: docker swarm join [OPTIONS] HOST:PORT
  2. Join a swarm as a node and/or manager
  3. Options:
  4. --advertise-addr string Advertised address (format: <ip|interface>[:port])
  5. --availability string Availability of the node ( "active"| "pause"| "drain") (default "active")
  6. --data-path-addr string Address or interface to use for data path traffic (format: <ip|interface>)
  7. --listen-addr node-addr Listen address (format: <ip|interface>[:port]) (default 0.0.0.0:2377)
  8. --token string Token for entry into the swarm

2.14.4帮助命令docker swarm join-token --help

命令明细[参数明细]:


  
  1. Usage: docker swarm join-token [OPTIONS] (worker|manager)
  2. Manage join tokens
  3. Options:
  4. -q, --quiet Only display token
  5. --rotate Rotate join token

2.14.5帮助命令docker swarm leave --help

命令明细[参数明细]:


  
  1. Usage: docker swarm leave [OPTIONS]
  2. Leave the swarm
  3. Options:
  4. -f, --force Force this node to leave the swarm, ignoring warnings

2.14.6帮助命令docker swarm unlock --help

命令明细[参数明细]:


  
  1. Usage: docker swarm unlock
  2. Unlock swarm

2.14.7帮助命令docker swarm unlock-key --help

命令明细[参数明细]:


  
  1. Usage: docker swarm unlock-key [OPTIONS]
  2. Manage the unlock key
  3. Options:
  4. -q, --quiet Only display token
  5. --rotate Rotate unlock key

2.14.8帮助命令docker swarm update --help

命令明细[参数明细]:


  
  1. Usage: docker swarm update [OPTIONS]
  2. Update the swarm
  3. Options:
  4. --autolock Change manager autolocking setting ( true| false)
  5. --cert-expiry duration Validity period for node certificates (ns|us|ms|s|m|h) (default 2160h0m0s)
  6. --dispatcher-heartbeat duration Dispatcher heartbeat period (ns|us|ms|s|m|h) (default 5s)
  7. --external-ca external-ca Specifications of one or more certificate signing endpoints
  8. --max-snapshots uint Number of additional Raft snapshots to retain
  9. --snapshot-interval uint Number of log entries between Raft snapshots (default 10000)
  10. --task-history-limit int Task history retention limit (default 5)

2.15帮助命令docker system --help

命令明细[参数明细]:


  
  1. Usage: docker system COMMAND
  2. Manage Docker
  3. Commands:
  4. df Show docker disk usage
  5. events Get real time events from the server
  6. info Display system-wide information
  7. prune Remove unused data
  8. Run 'docker system COMMAND --help' for more information on a command.

2.15.1帮助命令docker system df --help

命令明细[参数明细]:


  
  1. Usage: docker system df [OPTIONS]
  2. Show docker disk usage
  3. Options:
  4. --format string Pretty- print images using a Go template
  5. -v, --verbose Show detailed information on space usage

2.15.2帮助命令docker system events --help

命令明细[参数明细]:


  
  1. Usage: docker system events [OPTIONS]
  2. Get real time events from the server
  3. Options:
  4. -f, --filter filter Filter output based on conditions provided
  5. --format string Format the output using the given Go template
  6. --since string Show all events created since timestamp
  7. --until string Stream events until this timestamp

2.15.3帮助命令docker system info --help

命令明细[参数明细]:


  
  1. Usage: docker system info [OPTIONS]
  2. Display system-wide information
  3. Options:
  4. -f, --format string Format the output using the given Go template

2.15.4帮助命令docker system prune --help

命令明细[参数明细]:


  
  1. Usage: docker system prune [OPTIONS]
  2. Remove unused data
  3. Options:
  4. -a, --all Remove all unused images not just dangling ones
  5. --filter filter Provide filter values (e.g. 'label=<key>=<value>')
  6. -f, --force Do not prompt for confirmation
  7. --volumes Prune volumes

2.16帮助命令docker trust --help  

命令明细[参数明细]:


  
  1. Usage: docker trust COMMAND
  2. Manage trust on Docker images
  3. Management Commands:
  4. key Manage keys for signing Docker images
  5. signer Manage entities who can sign Docker images
  6. Commands:
  7. inspect Return low-level information about keys and signatures
  8. revoke Remove trust for an image
  9. sign Sign an image
  10. Run 'docker trust COMMAND --help' for more information on a command.

2.16.1帮助命令docker trust key --help

命令明细[参数明细]:


  
  1. Usage: docker trust key COMMAND
  2. Manage keys for signing Docker images
  3. Commands:
  4. generate Generate and load a signing key-pair
  5. load Load a private key file for signing
  6. Run 'docker trust key COMMAND --help' for more information on a command.

2.16.1.1帮助命令docker trust key generate --help

命令明细[参数明细]:


  
  1. Usage: docker trust key generate NAME
  2. Generate and load a signing key-pair
  3. Options:
  4. -- dir string Directory to generate key in, defaults to current directory

2.16.1.2帮助命令docker trust key load --help

命令明细[参数明细]:


  
  1. Usage: docker trust key load [OPTIONS] KEYFILE
  2. Load a private key file for signing
  3. Options:
  4. --name string Name for the loaded key (default "signer")

2.16.2帮助命令docker trust signer --help

命令明细[参数明细]:


  
  1. Usage: docker trust signer COMMAND
  2. Manage entities who can sign Docker images
  3. Commands:
  4. add Add a signer
  5. remove Remove a signer
  6. Run 'docker trust signer COMMAND --help' for more information on a command.

2.16.2.1帮助命令docker trust signer add --help

命令明细[参数明细]:


  
  1. Usage: docker trust signer add OPTIONS NAME REPOSITORY [REPOSITORY...]
  2. Add a signer
  3. Options:
  4. --key list Path to the signer 's public key file

2.16.2.2帮助命令docker trust signer remove --help

命令明细[参数明细]:


  
  1. Usage: docker trust signer remove [OPTIONS] NAME REPOSITORY [REPOSITORY...]
  2. Remove a signer
  3. Options:
  4. -f, --force Do not prompt for confirmation before removing the most recent signer

2.16.3帮助命令docker trust inspect --help

命令明细[参数明细]:


  
  1. Usage: docker trust inspect IMAGE[:TAG] [IMAGE[:TAG]...]
  2. Return low-level information about keys and signatures
  3. Options:
  4. --pretty Print the information in a human friendly format

2.16.4帮助命令docker trust revoke --help

命令明细[参数明细]:


  
  1. Usage: docker trust revoke [OPTIONS] IMAGE[:TAG]
  2. Remove trust for an image
  3. Options:
  4. -y, -- yes Do not prompt for confirmation

2.16.5帮助命令docker trust sign --help

命令明细[参数明细]:


  
  1. Usage: docker trust sign IMAGE:TAG
  2. Sign an image
  3. Options:
  4. -- local Sign a locally tagged image

2.17帮助命令docker volume --help

命令明细[参数明细]:


  
  1. Usage: docker volume COMMAND
  2. Manage volumes
  3. Commands:
  4. create Create a volume
  5. inspect Display detailed information on one or more volumes
  6. ls List volumes
  7. prune Remove all unused local volumes
  8. rm Remove one or more volumes
  9. Run 'docker volume COMMAND --help' for more information on a command.

2.17.1帮助命令docker volume create --help

命令明细[参数明细]:


  
  1. Usage: docker volume create [OPTIONS] [VOLUME]
  2. Create a volume
  3. Options:
  4. -d, --driver string Specify volume driver name (default "local")
  5. --label list Set metadata for a volume
  6. -o, --opt map Set driver specific options (default map[])

2.17.2帮助命令docker volume inspect --help

命令明细[参数明细]:


  
  1. Usage: docker volume inspect [OPTIONS] VOLUME [VOLUME...]
  2. Display detailed information on one or more volumes
  3. Options:
  4. -f, --format string Format the output using the given Go template

2.17.3帮助命令docker volume ls --help

命令明细[参数明细]:


  
  1. Usage: docker volume ls [OPTIONS]
  2. List volumes
  3. Aliases:
  4. ls, list
  5. Options:
  6. -f, --filter filter Provide filter values (e.g. 'dangling=true')
  7. --format string Pretty- print volumes using a Go template
  8. -q, --quiet Only display volume names

2.17.4帮助命令docker volume prune --help

命令明细[参数明细]:


  
  1. Usage: docker volume prune [OPTIONS]
  2. Remove all unused local volumes
  3. Options:
  4. --filter filter Provide filter values (e.g. 'label=<label>')
  5. -f, --force Do not prompt for confirmation

2.17.5帮助命令docker volume rm --help

命令明细[参数明细]:


  
  1. Usage: docker volume rm [OPTIONS] VOLUME [VOLUME...]
  2. Remove one or more volumes. You cannot remove a volume that is in use by a container.
  3. Aliases:
  4. rm, remove
  5. Examples:
  6. $ docker volume rm hello
  7. hello
  8. Options:
  9. -f, --force Force the removal of one or more volumes

3.导出Docker命令明细脚本

导出Docker命令明细脚本,把每个命令详情生成到独立的指定文件中。

文件名:commandFile.sh

赋可执行权限:chmod a+x commandFile.sh

执行命令:./commandFile.sh

脚本内容:


  
  1. #!/bin/bash
  2. docker -- help >> 1docker.txt
  3. docker builder -- help >> 2docker-builder.txt
  4. docker builder build -- help >> 2-1docker-builder-build.txt
  5. docker builder prune -- help >> 2-2docker-builder-prune.txt
  6. docker config -- help >> 3docker-config.txt
  7. docker config create -- help >> 3-1docker-config-create.txt
  8. docker config inspect -- help >> 3-2docker-config-inspect.txt
  9. docker config ls -- help >> 3-3docker-config-ls.txt
  10. docker config rm -- help >> 3-4docker-config-rm.txt
  11. docker container -- help >> 4docker-container.txt
  12. docker container attach -- help >> 4-1docker-container-attach.txt
  13. docker container commit -- help >> 4-2docker-container-commit.txt
  14. docker container cp -- help >> 4-3docker-container-cp.txt
  15. docker container create -- help >> 4-4docker-container-create.txt
  16. docker container diff -- help >> 4-5docker-container-diff.txt
  17. docker container exec -- help >> 4-6docker-container-exec.txt
  18. docker container export -- help >> 4-7docker-container-export.txt
  19. docker container inspect -- help >> 4-8docker-container-inspect.txt
  20. docker container kill -- help >> 4-9docker-container-kill.txt
  21. docker container logs -- help >> 4-10docker-container-logs.txt
  22. docker container ls -- help >> 4-11docker-container-ls.txt
  23. docker container pause -- help >> 4-12docker-container-pause.txt
  24. docker container port -- help >> 4-13docker-container-port.txt
  25. docker container prune -- help >> 4-14docker-container-prune.txt
  26. docker container rename -- help >> 4-15docker-container-rename.txt
  27. docker container restart -- help >> 4-16docker-container-restart.txt
  28. docker container rm -- help >> 4-17docker-container-rm.txt
  29. docker container run -- help >> 4-18docker-container-run.txt
  30. docker container start -- help >> 4-19docker-container-start.txt
  31. docker container stats -- help >> 4-20docker-container-stats.txt
  32. docker container stop -- help >> 4-21docker-container-stop.txt
  33. docker container top -- help >> 4-22docker-container-top.txt
  34. docker container unpause -- help >> 4-23docker-container-unpause.txt
  35. docker container update -- help >> 4-24docker-container-update.txt
  36. docker container wait -- help >> 4-25docker-container-wait.txt
  37. docker context -- help >> 5docker-context.txt
  38. docker context create -- help >> 5-1docker-context-create.txt
  39. docker context export -- help >> 5-2docker-context-export.txt
  40. docker context import -- help >> 5-3docker-context-import.txt
  41. docker context inspect -- help >> 5-4docker-context-inspect.txt
  42. docker context ls -- help >> 5-5docker-context-ls.txt
  43. docker context rm -- help >> 5-6docker-context-rm.txt
  44. docker context update -- help >> 5-7docker-context-update.txt
  45. docker context use -- help >> 5-8docker-context-use.txt
  46. docker engine -- help >> 6docker-engine.txt
  47. docker engine activate -- help >> 6-1docker-engine-activate.txt
  48. docker engine check -- help >> 6-2docker-engine-check.txt
  49. docker engine update -- help >> 6-3docker-engine-update.txt
  50. docker image -- help >> 7docker-image.txt
  51. docker image build -- help >> 7-1docker-image-build.txt
  52. docker image history -- help >> 7-2docker-image-history.txt
  53. docker image import -- help >> 7-3docker-image-import.txt
  54. docker image inspect -- help >> 7-4docker-image-inspect.txt
  55. docker image load -- help >> 7-5docker-image-load.txt
  56. docker image ls -- help >> 7-6docker-image-ls.txt
  57. docker image prune -- help >> 7-7docker-image-prune.txt
  58. docker image pull -- help >> 7-8docker-image-pull.txt
  59. docker image push -- help >> 7-9docker-image-push.txt
  60. docker image rm -- help >> 7-10docker-image-rm.txt
  61. docker image save -- help >> 7-11docker-image-save.txt
  62. docker image tag -- help >> 7-12docker-image-tag.txt
  63. docker network -- help >> 8docker-network.txt
  64. docker network connect -- help >> 8-1docker-network-connect.txt
  65. docker network create -- help >> 8-2docker-network-create.txt
  66. docker network disconnect -- help >> 8-3docker-network-disconnect.txt
  67. docker network inspect -- help >> 8-4docker-network-inspect.txt
  68. docker network ls -- help >> 8-5docker-network-ls.txt
  69. docker network prune -- help >> 8-6docker-network-prune.txt
  70. docker network rm -- help >> 8-7docker-network-rm.txt
  71. docker node -- help >> 9docker-node.txt
  72. docker node demote -- help >> 9-1docker-node-demote.txt
  73. docker node promote -- help >> 9-2docker-node-promote.txt
  74. docker node ls -- help >> 9-3docker-node-ls.txt
  75. docker node promote -- help >> 9-4docker-node-promote.txt
  76. docker node ps -- help >> 9-5docker-node-ps.txt
  77. docker node rm -- help >> 9-6docker-node-rm.txt
  78. docker node update -- help >> 9-7docker-node-update.txt
  79. docker plugin -- help >> 10docker-plugin.txt
  80. docker plugin create -- help >> 10-1docker-plugin-create.txt
  81. docker plugin disable -- help >> 10-2docker-plugin-disable.txt
  82. docker plugin enable -- help >> 10-3docker-plugin-enable.txt
  83. docker plugin inspect -- help >> 10-4docker-plugin-inspect.txt
  84. docker plugin install -- help >> 10-5docker-plugin-install.txt
  85. docker plugin ls -- help >> 10-6docker-plugin-ls.txt
  86. docker plugin push -- help >> 10-7docker-plugin-push.txt
  87. docker plugin rm -- help >> 10-8docker-plugin-rm.txt
  88. docker plugin set -- help >> 10-9docker-plugin-set.txt
  89. docker plugin upgrade -- help >> 10-10docker-plugin-upgrade.txt
  90. docker secret -- help >> 11docker-secret.txt
  91. docker secret create -- help >> 11-1docker-secret-create.txt
  92. docker secret inspect -- help >> 11-2docker-secret-inspect.txt
  93. docker secret ls -- help >> 11-3docker-secret-ls.txt
  94. docker secret rm -- help >> 11-4docker-secret-rm.txt
  95. docker service -- help >> 12docker-service.txt
  96. docker service create -- help >> 12-1docker-service-create.txt
  97. docker service inspect -- help >> 12-2docker-service-inspect.txt
  98. docker service logs -- help >> 12-3docker-service-logs.txt
  99. docker service ls -- help >> 12-4docker-service-ls.txt
  100. docker service ps -- help >> 12-5docker-service-ps.txt
  101. docker service rm -- help >> 12-6docker-service-rm.txt
  102. docker service rollback -- help >> 12-7docker-service-rollback.txt
  103. docker service scale -- help >> 12-8docker-service-scale.txt
  104. docker service update -- help >> 12-9docker-service-update.txt
  105. docker stack -- help >> 13docker-stack.txt
  106. docker stack deploy -- help >> 13-1docker-stack-deploy.txt
  107. docker stack ls -- help >> 13-2docker-stack-ls.txt
  108. docker stack ps -- help >> 13-3docker-stack-ps.txt
  109. docker stack rm -- help >> 13-4docker-stack-rm.txt
  110. docker stack services -- help >> 13-5docker-stack-services.txt
  111. docker swarm -- help >> 14docker-swarm.txt
  112. docker swarm ca -- help >> 14-1docker-swarm-ca.txt
  113. docker swarm init -- help >> 14-2docker-swarm-init.txt
  114. docker swarm join -- help >> 14-3docker-swarm-join.txt
  115. docker swarm join-token -- help >> 14-4docker-swarm-join-token.txt
  116. docker swarm leave -- help >> 14-5docker-swarm-leave.txt
  117. docker swarm unlock -- help >> 14-6docker-swarm-unlock.txt
  118. docker swarm unlock-key -- help >> 14-7docker-swarm-unlock-key.txt
  119. docker swarm update -- help >> 14-8docker-swarm-update.txt
  120. docker system -- help >> 15docker-system.txt
  121. docker system df -- help >> 15-1docker-system-df.txt
  122. docker system events -- help >> 15-2docker-system-events.txt
  123. docker system info -- help >> 15-3docker-system-info.txt
  124. docker system prune -- help >> 15-4docker-system-prune.txt
  125. docker trust -- help >> 16docker-trust.txt
  126. docker trust key -- help >>16-1docker-trust-key.txt
  127. docker trust key generate -- help >>16-1-1docker-trust-key-generate.txt
  128. docker trust key load -- help >>16-1-2docker-trust-key-load.txt
  129. docker trust signer -- help >>16-2docker-trust-signer.txt
  130. docker trust signer add -- help >>16-2-1docker-trust-signer-add.txt
  131. docker trust signer remove -- help >>16-2-2docker-trust-signer-remove.txt
  132. docker trust inspect -- help >>16-3docker-trust-inspect.txt
  133. docker trust revoke -- help >>16-4docker-trust-revoke.txt
  134. docker trust sign -- help >> 16-5docker-trust-sign.txt
  135. docker volume -- help >> 17docker-volume.txt
  136. docker volume create -- help >>17-1docker-volume-create.txt
  137. docker volume inspect -- help >>17-2docker-volume-inspect.txt
  138. docker volume ls -- help >>17-3docker-volume-ls.txt
  139. docker volume prune -- help >>17-4docker-volume-prune.txt
  140. docker volume rm -- help >> 17-5docker-volume-rm.txt

以上,感谢。

2022年12月27日


转载:https://blog.csdn.net/zhangbeizhen18/article/details/128429960
查看评论
* 以上用户言论只代表其个人观点,不代表本网站的观点或立场