Docker Command

Docker Command


Usage: docker [OPTIONS] COMMAND

A self-sufficient runtime for containers
一个自给自足的运行时容器

Options:
选项:
–config string Location of client config files (default “/root/.docker”)
本地客户端配置文件,默认/root/.docker
-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”)
连接daemon使用的上下文名称(复写DOCKER_HOST环境变量,并且默认内容设置为"docker context use")。
-D, --debug Enable debug mode
激活debug模式。
-H, --host list Daemon socket(s) to connect to
可以连接的Daemon的主机列表。
-l, --log-level string Set the logging level (“debug”|“info”|“warn”|“error”|“fatal”) (default “info”)
设置日志的等级(“debug”|“info”|“warn”|“error”|“fatal”),默认是info。
–tls Use TLS; implied by --tlsverify
使用TLS,由–tlsverify指定。
–tlscacert string Trust certs signed only by this CA (default “/root/.docker/ca.pem”)
由CA颁发的信任证书签名,默认为/root/.docker/ca.pem。
–tlscert string Path to TLS certificate file (default “/root/.docker/cert.pem”)
TLS证书的路径。默认为/root/.docker/cert.pem。
–tlskey string Path to TLS key file (default “/root/.docker/key.pem”)
TLS key的路径。默认为/root/.docker/key.pem。
–tlsverify Use TLS and verify the remote
使用TLS检验远程终端。
-v, --version Print version information and quit
打印版本信息,并退出。

Management Commands:
管理命令:
builder Manage builds
编译器 管理编译
config Manage Docker configs
配置 管理Docker配置
container Manage containers
容器 管理容器
context Manage contexts
环境,上线文
engine Manage the docker engine
引擎
image Manage images
镜像
network Manage networks
网络
node Manage Swarm nodes
Swarm 节点
plugin Manage plugins
插件
secret Manage Docker secrets
Docker秘钥
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
用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
把容器中的文件打成tar包。
history Show the history of an image
展示一个镜像的历史信息。
images List images
镜像的列表。
import Import the contents from a tarball to create a filesystem image
导入tar包内容,并生成一个文件系统镜像。
info Display system-wide information
显示系统的信息。
inspect Return low-level information on Docker objects
返回Docker对象低水平信息。
kill Kill one or more running containers
杀掉一个或更多个正在运行的容器。
load Load an image from a tar archive or STDIN
从tar文件或标准输入中加载一个镜像。
login Log in to a Docker registry
登陆到Docker仓库。
logout Log out from a Docker registry
退出Docker仓库。
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)
保存一个或者多个镜像到tar文件中。默认是保存到标准输出。
search Search the Docker Hub for images
从Docker Hub中查找镜像。
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
以源镜像为版本创建一个分支版本,分支版本的tag为指定的tag。注意,分支版本和源版本的容器ID是相同的,如果要删除,需要强制删除,docker rmi -f CID。
docker tag SOURCE_IMAGE:TAG TARGET_IMAGE:tag

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
显示Docker版本信息。
wait Block until one or more containers stop, then print their exit codes
阻塞知道一个或多个容器停止,然后打印它们的退出码。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值