Docke 1.12 基础篇:48条命令(1)

docker1.12中目前有48条命令,这里面有非常简单的version或者info的确认信息用的命令,也有内置的swarm mode的需要有集群环境才能执行的命令。我们在这个系列中将会逐条确认简单的使用方法。

事前准备

OS

演示用Linux发型版使用CentOS7.2,Linux内核3.10

[root@liumiaocn ~]# uname -a
Linux liumiaocn 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@liumiaocn ~]#

Docker版本

Docker版本1.12.1
[root@liumiaocn ~]# docker version
Client:
 Version:      1.12.1
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   23cf638
 Built:
 OS/Arch:      linux/amd64
 Experimental: true

Server:
 Version:      1.12.1
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   23cf638
 Built:
 OS/Arch:      linux/amd64
 Experimental: true
[root@liumiaocn ~]#

安装方法:目前CentOS7.2标准配置的docker版本为1.10。因为使用的是centos的experiment的docker repo,在centos的版本升上去之前下面的方法应该会一直会有效。刚刚再次试验过,目前仍然有效。

CentOS7上安装Docker1.12.1http://blog.csdn.net/liumiaocn/article/details/52130852

docker 1.12的48条命令

以下是docker –help出来的48条命令,我们会在接下来的例子中逐条确认使用方法。

项番命令详解
No.1attachAttach to a running container
No.2buildBuild an image from a Dockerfile
No.3commitCreate a new image from a container’s changes
No.4cpCopy files/folders between a container and the local filesystem
No.5createCreate a new container
No.6deployCreate and update a stack from a Distributed Application Bundle (DAB)
No.7diffInspect changes on a container’s filesystem
No.8eventsGet real time events from the server
No.9execRun a command in a running container
No.10exportExport a container’s filesystem as a tar archive
No.11historyShow the history of an image
No.12imagesList images
No.13importImport the contents from a tarball to create a filesystem image
No.14infoDisplay system-wide information
No.15inspectReturn low-level information on a container, image or task
No.16killKill one or more running containers
No.17loadLoad an image from a tar archive or STDIN
No.18loginLog in to a Docker registry.
No.19logoutLog out from a Docker registry.
No.20logsFetch the logs of a container
No.21networkManage Docker networks
No.22nodeManage Docker Swarm nodes
No.23pausePause all processes within one or more containers
No.24pluginManage Docker plugins
No.25portList port mappings or a specific mapping for the container
No.26psList containers
No.27pullPull an image or a repository from a registry
No.28pushPush an image or a repository to a registry
No.29renameRename a container
No.30restartRestart a container
No.31rmRemove one or more containers
No.32rmiRemove one or more images
No.33runRun a command in a new container
No.34saveSave one or more images to a tar archive (streamed to STDOUT by default)
No.35searchSearch the Docker Hub for images
No.36serviceManage Docker services
No.37stackManage Docker stacks
No.38startStart one or more stopped containers
No.39statsDisplay a live stream of container(s) resource usage statistics
No.40stopStop one or more running containers
No.41swarmManage Docker Swarm
No.42tagTag an image into a repository
No.43topDisplay the running processes of a container
No.44unpauseUnpause all processes within one or more containers
No.45updateUpdate configuration of one or more containers
No.46versionShow the Docker version information
No.47volumeManage Docker volumes
No.48waitBlock until a container stops, then print its exit code
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值