英文:
bash
Flag shorthand -h has been deprecated, please use --help
Usage: docker [OPTIONS] COMMAND
A self-sufficient runtime for containers
Options:
--config string Location of client config files (default "/root/.docker")
-D, --debug Enable debug mode
-H, --host list Daemon socket(s) to connect to
-l, --log-level string Set the logging level ("debug"|"info"|"warn"|"error"|"fatal") (default "info")
--tls Use TLS; implied by --tlsverify
--tlscacert string Trust certs signed only by this CA (default "/root/.docker/ca.pem")
--tlscert string Path to TLS certificate file (default "/root/.docker/cert.pem")
--tlskey string Path to TLS key file (default "/root/.docker/key.pem")
--tlsverify Use TLS and verify the remote
-v, --version Print version information and quit
Management Commands:
builder Manage builds
config Manage Docker configs
container Manage containers
engine Manage the docker engine
image Manage images
network Manage networks
node Manage Swarm nodes
plugin Manage plugins
secret Manage Docker secrets
service Manage services
stack Manage Docker stacks
swarm Manage Swarm
system Manage Docker
trust Manage trust on Docker images
volume Manage volumes
Commands:
attach Attach local standard input, output, and error streams to a running container
build Build an image from a Dockerfile
commit Create a new image from a container's changes
cp Copy files/folders between a container and the local filesystem
create Create a new container
diff Inspect changes to files or directories on a container's filesystem
events Get real time events from the server
exec Run a command in a running container
export Export a container's filesystem as a tar archive
history Show the history of an image
images List images
import Import the contents from a tarball to create a filesystem image
info Display system-wide information
inspect Return low-level information on Docker objects
kill Kill one or more running containers
load Load an image from a tar archive or STDIN
login Log in to a Docker registry
logout Log out from a Docker registry
logs Fetch the logs of a container
pause Pause all processes within one or more containers
port List port mappings or a specific mapping for the container
ps List containers
pull Pull an image or a repository from a registry
push Push an image or a repository to a registry
rename Rename a container
restart Restart one or more containers
rm Remove one or more containers
rmi Remove one or more images
run Run a command in a new container
save Save one or more images to a tar archive (streamed to STDOUT by default)
search Search the Docker Hub for images
start Start one or more stopped containers
stats Display a live stream of container(s) resource usage statistics
stop Stop one or more running containers
tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
top Display the running processes of a container
unpause Unpause all processes within one or more containers
update Update configuration of one or more containers
version Show the Docker version information
wait Block until one or more containers stop, then print their exit codes
汉语:
bash
标志简写 -h 已被弃用,请使用 --help
用法:docker [选项] 命令
一个自给自足的容器运行时
选项:
--config string 客户端配置文件的位置(默认为 "/root/.docker")
-D, --debug 启用调试模式
-H, --host list 要连接的守护进程套接字列表
-l, --log-level string 设置日志级别("debug"|"info"|"warn"|"error"|"fatal")(默认为 "info")
--tls 使用 TLS;--tlsverify 隐含此选项
--tlscacert string 仅信任由此 CA 签名的证书(默认为 "/root/.docker/ca.pem")
--tlscert string TLS 证书文件的路径(默认为 "/root/.docker/cert.pem")
--tlskey string TLS 密钥文件的路径(默认为 "/root/.docker/key.pem")
--tlsverify 使用 TLS 并验证远程连接
-v, --version 打印版本信息并退出
管理命令:
builder 管理构建
config 管理 Docker 配置
container 管理容器
engine 管理 Docker 引擎
image 管理镜像
network 管理网络
node 管理 Swarm 节点
plugin 管理插件
secret 管理 Docker 密钥
service 管理服务
stack 管理 Docker 堆栈
swarm 管理 Swarm
system 管理 Docker 系统
trust 管理 Docker 镜像的信任
volume 管理卷
命令:
attach 将本地标准输入、输出和错误流附加到正在运行的容器
build 从 Dockerfile 构建镜像
commit 从容器的更改创建新镜像
cp 在容器和本地文件系统之间复制文件/文件夹
create 创建新容器
diff 检查容器文件系统上文件或目录的更改
events 从服务器获取实时事件
exec 在正在运行的容器中运行命令
export 将容器的文件系统导出为 tar 存档
history 显示镜像的历史记录
images 列出镜像
import 从 tarball 导入内容以创建文件系统镜像
info 显示系统范围的信息
inspect 返回 Docker 对象的低级信息
kill 杀死一个或多个正在运行的容器
load 从 tar 存档或 STDIN 加载镜像
login 登录到 Docker 注册表
logout 从 Docker 注册表注销
logs 获取容器的日志
pause 暂停一个或多个容器内的所有进程
port 列出端口映射或容器的特定映射
ps 列出容器
pull 从注册表拉取镜像或仓库
push 将镜像或仓库推送到注册表
rename 重命名容器
restart 重新启动一个或多个容器
rm 移除一个或多个容器
rmi 移除一个或多个镜像
run 在新容器中运行命令
save 将一个或多个镜像保存到 tar 存档(默认流式传输到 STDOUT)
search 在 Docker Hub 中搜索镜像
start 启动一个或多个已停止的容器
stats 实时显示容器资源使用统计信息流
stop 停止一个或多个正在运行的容器
tag 创建引用 SOURCE_IMAGE 的标签 TARGET_IMAGE
top 显示容器的运行进程
unpause 恢复一个或多个容器内的所有进程
update 更新一个或多个容器的配置
version 显示 Docker 版本信息
wait 阻塞直到一个或多个容器停止,然后打印其退出代码