这里解释一下docker -h 所查看到的选项
[root@master ~]# docker -h
Flag shorthand -h has been deprecated, please use --help
Usage: docker [OPTIONS] COMMAND
A self-sufficient runtime for containers
#这些命令用于管理 Docker 容器和镜像。
Common Commands:
run Create and run a new container from an image
#run: 从镜像创建并运行一个新的容器。
exec Execute a command in a running container
#exec: 在一个正在运行的容器中执行命令。
ps List containers
#ps: 列出容器。
build Build an image from a Dockerfile
#build: 从 Dockerfile 构建一个镜像。
pull Download an image from a registry
#pull: 从镜像仓库下载一个镜像。
push Upload an image to a registry
#push: 将一个镜像上传到镜像仓库。
images List images
#images: 列出镜像。
login Log in to a registry
#login: 登录到一个镜像仓库。
logout Log out from a registry
#logout: 从一个镜像仓库注销。
search Search Docker Hub for images
#logout: 从一个镜像仓库注销。
version Show the Docker version information
#version: 显示 Docker 版本信息。
info Display system-wide information
#info: 显示系统范围的信息。
#这些是 Docker 的管理命令,用于管理容器、镜像、网络等不同方面的功能:
Management Commands:
builder Manage builds
#builder: 管理构建(build)相关的功能,比如构建镜像。
buildx* Docker Buildx
#buildx*: Docker Buildx,用于实验性的多平台镜像构建。
compose* Docker Compose
#compose*: Docker Compose,用于定义和运行多个容器的应用程序。
container Manage containers
#container: 管理容器,比如启动、停止、删除容器等。
context Manage contexts
#context: 管理上下文,可以用来切换 Docker 守护进程的连接。
image Manage images
#image: 管理镜像,比如列出、删除、打标签等。
manifest Manage Docker image manifests and manifest lists
#manifest: 管理 Docker 镜像清单和清单列表,通常与多平台构建相关。
network Manage networks
#network: 管理网络,比如创建、连接、断开网络等。
plugin Manage plugins
#network: 管理网络,比如创建、连接、断开网络等。
system Manage Docker
#system: 管理 Docker 系统,包括信息、事件、登录等。
trust Manage trust on Docker images
#trust: 管理 Docker 镜像的信任。
volume Manage volumes
#volume: 管理卷,用于持久化容器中的数据。
#这是用于管理 Docker Swarm 的命令:
Swarm Commands:
swarm Manage Swarm
#swarm: 用于管理 Docker Swarm,包括初始化 Swarm、加入节点、更新配置等操作。
#这些是 Docker 命令的详细说明:
Commands:
attach Attach local standard input, output,