1. 用法:docker [OPTIONS] 命令
    2. 容器的自给自足运行时
    3. 选项:
    4. --config string 客户端配置文件的位置(默认为“/root/.docker”)
    5. -c,——context string 用于连接守护进程的上下文名称 (覆盖DOCKER_HOST环境变量和默认上下文设置docker上下文使用)
    6. -D,——debug 开启调试模式
    7. -H,——host list 要连接的Daemon套接字
    8. -l,——log-level string 设置日志级别 ("debug"|"info"|"warn"|"error"|"fatal") (default "info")
    9. ——tls 使用TLS;暗示了——tlsverify
    10. ——tlscacert string 仅由该CA签名的信任证书(默认"/ 根/ .docker / ca.pem”)
    11. ——tlscert string TLS证书文件路径(默认"/ 根/ .docker / cert.pem”)TLS密钥文件路径(默认为“/root/.docker/key.pem”)
    12. ——tlsverify 使用TLS协议并验证远端
    13. -v,——version 打印版本信息并退出
    14. 管理命令:
    15. app* Docker app (Docker Inc., v0.9.1-beta3)
    16. builder 施工管理
    17. buildx* Docker (Docker Inc., v0.7.1-docker)
    18. config 管理Docker配置
    19. container 容器管理的容器
    20. context 环境管理环境
    21. mage 镜像管理
    22. manifest 管理Docker图像清单和清单列表
    23. network 网络管理网络
    24. node 节点管理集群节点
    25. plugin 插件管理插件
    26. scan* Docker扫描(Docker Inc., v0.12.0)
    27. secret Docker的秘密
    28. service 管理服务
    29. stack 管理Docker
    30. swarm 群管理群
    31. system 系统管理码头工人
    32. trust 管理Docker映像的信任
    33. volume 卷管理卷
    34. 命令:
    35. attach 将本地标准输入、输出和错误流附加到一个正在运行的容器
    36. build Dockerfile中构建一个映像
    37. commit 从容器的更改中创建一个新的映像
    38. cp 在容器和本地文件系统之间复制文件/文件夹
    39. create 创建一个新的容器
    40. diff 检查容器文件系统中文件或目录的更改
    41. events 从服务器获取实时事件
    42. exec 在正在运行的容器中运行命令
    43. export 将容器的文件系统导出为tar存档文件
    44. history 显示图像的历史
    45. images 镜像列表
    46. import tarball文件中导入内容以创建文件系统映像
    47. info 显示系统信息
    48. inspect 返回Docker对象的底层信息
    49. kill 杀死一个或多个正在运行的容器
    50. load tar文件或STDIN中加载图像
    51. login 登录Docker注册表
    52. logout 退出Docker注册表
    53. logs 获取容器的日志
    54. pause 暂停一个或多个容器中的所有进程
    55. port 列出端口映射或容器的特定映射
    56. ps 列表容器
    57. pull 从注册表中拉出一个图像或一个存储库
    58. push 镜像或存储库到注册表
    59. rename 重命名容器
    60. restart 重启一个或多个容器
    61. rm 删除一个或多个容器
    62. rmi 删除一个或多个镜像
    63. run 在新容器中运行命令
    64. save 保存一个或多个图像到tar存档文件(默认流到STDOUT)
    65. search 搜索Docker Hub的图片
    66. start 启动一个或多个已停止的容器
    67. stats 显示容器资源使用统计的实时流
    68. stop 停止一个或多个正在运行的容器
    69. tag 创建一个指向SOURCE_IMAGETARGET_IMAGE标签
    70. top 显示容器的运行进程
    71. unpause 取消暂停一个或多个容器中的所有进程
    72. update 更新一个或多个容器的配置
    73. version 显示Docker版本信息
    1. Usage: docker 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. --cgroupns string Cgroup namespace to use (host|private)
    12. 'host': Run the container in the Docker host's cgroup namespace
    13. 'private': Run the container in its own private cgroup namespace
    14. '': Use the cgroup namespace as configured by the
    15. default-cgroupns-mode option on the daemon (default)
    16. --cidfile string Write the container ID to the file
    17. --cpu-period int Limit CPU CFS (Completely Fair Scheduler) period
    18. --cpu-quota int Limit CPU CFS (Completely Fair Scheduler) quota
    19. --cpu-rt-period int Limit CPU real-time period in microseconds
    20. --cpu-rt-runtime int Limit CPU real-time runtime in microseconds
    21. -c, --cpu-shares int CPU shares (relative weight)
    22. --cpus decimal Number of CPUs
    23. --cpuset-cpus string CPUs in which to allow execution (0-3, 0,1)
    24. --cpuset-mems string MEMs in which to allow execution (0-3, 0,1)
    25. -d, --detach Run container in background and print container ID
    26. --detach-keys string Override the key sequence for detaching a container
    27. --device list Add a host device to the container
    28. --device-cgroup-rule list Add a rule to the cgroup allowed devices list
    29. --device-read-bps list Limit read rate (bytes per second) from a device (default [])
    30. --device-read-iops list Limit read rate (IO per second) from a device (default [])
    31. --device-write-bps list Limit write rate (bytes per second) to a device (default [])
    32. --device-write-iops list Limit write rate (IO per second) to a device (default [])
    33. --disable-content-trust Skip image verification (default true)
    34. --dns list Set custom DNS servers
    35. --dns-option list Set DNS options
    36. --dns-search list Set custom DNS search domains
    37. --domainname string Container NIS domain name
    38. --entrypoint string Overwrite the default ENTRYPOINT of the image
    39. -e, --env list Set environment variables
    40. --env-file list Read in a file of environment variables
    41. --expose list Expose a port or a range of ports
    42. --gpus gpu-request GPU devices to add to the container ('all' to pass all GPUs)
    43. --group-add list Add additional groups to join
    44. --health-cmd string Command to run to check health
    45. --health-interval duration Time between running the check (ms|s|m|h) (default 0s)
    46. --health-retries int Consecutive failures needed to report unhealthy
    47. --health-start-period duration Start period for the container to initialize before starting health-retries
    48. countdown (ms|s|m|h) (default 0s)
    49. --health-timeout duration Maximum time to allow one check to run (ms|s|m|h) (default 0s)
    50. --help Print usage
    51. -h, --hostname string Container host name
    52. --init Run an init inside the container that forwards signals and reaps processes
    53. -i, --interactive Keep STDIN open even if not attached
    54. --ip string IPv4 address (e.g., 172.30.100.104)
    55. --ip6 string IPv6 address (e.g., 2001:db8::33)
    56. --ipc string IPC mode to use
    57. --isolation string Container isolation technology
    58. --kernel-memory bytes Kernel memory limit
    59. -l, --label list Set meta data on a container
    60. --label-file list Read in a line delimited file of labels
    61. --link list Add link to another container
    62. --link-local-ip list Container IPv4/IPv6 link-local addresses
    63. --log-driver string Logging driver for the container
    64. --log-opt list Log driver options
    65. --mac-address string Container MAC address (e.g., 92:d0:c6:0a:29:33)
    66. -m, --memory bytes Memory limit
    67. --memory-reservation bytes Memory soft limit
    68. --memory-swap bytes Swap limit equal to memory plus swap: '-1' to enable unlimited swap
    69. --memory-swappiness int Tune container memory swappiness (0 to 100) (default -1)
    70. --mount mount Attach a filesystem mount to the container
    71. --name string Assign a name to the container
    72. --network network Connect a container to a network
    73. --network-alias list Add network-scoped alias for the container
    74. --no-healthcheck Disable any container-specified HEALTHCHECK
    75. --oom-kill-disable Disable OOM Killer
    76. --oom-score-adj int Tune host's OOM preferences (-1000 to 1000)
    77. --pid string PID namespace to use
    78. --pids-limit int Tune container pids limit (set -1 for unlimited)
    79. --platform string Set platform if server is multi-platform capable
    80. --privileged Give extended privileges to this container
    81. -p, --publish list Publish a container's port(s) to the host
    82. -P, --publish-all Publish all exposed ports to random ports
    83. --pull string Pull image before running ("always"|"missing"|"never") (default "missing")
    84. --read-only Mount the container's root filesystem as read only
    85. --restart string Restart policy to apply when a container exits (default "no")
    86. --rm Automatically remove the container when it exits
    87. --runtime string Runtime to use for this container
    88. --security-opt list Security Options
    89. --shm-size bytes Size of /dev/shm
    90. --sig-proxy Proxy received signals to the process (default true)
    91. --stop-signal string Signal to stop a container (default "SIGTERM")
    92. --stop-timeout int Timeout (in seconds) to stop a container
    93. --storage-opt list Storage driver options for the container
    94. --sysctl map Sysctl options (default map[])
    95. --tmpfs list Mount a tmpfs directory
    96. -t, --tty Allocate a pseudo-TTY
    97. --ulimit ulimit Ulimit options (default [])
    98. -u, --user string Username or UID (format: <name|uid>[:<group|gid>])
    99. --userns string User namespace to use
    100. --uts string UTS namespace to use
    101. -v, --volume list Bind mount a volume
    102. --volume-driver string Optional volume driver for the container
    103. --volumes-from list Mount volumes from the specified container(s)
    104. -w, --workdir string Working directory inside the container