Docke 1 12 基礎篇 48條命令 1
阿新 • • 發佈:2019-01-09
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 ~]#
- 1
- 2
- 3
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 ~]#
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
安裝方法:目前CentOS7.2標準配置的docker版本為1.10。因為使用的是centos的experiment的docker repo,在centos的版本升上去之前下面的方法應該會一直會有效。剛剛再次試驗過,目前仍然有效。
CentOS7上安裝Docker1.12.1 | http://blog.csdn.net/liumiaocn/article/details/52130852 |
---|
docker 1.12的48條命令
以下是docker –help出來的48條命令,我們會在接下來的例子中逐條確認使用方法。
項番 | 命令 | 詳解 |
---|---|---|
No.1 | attach | Attach to a running container |
No.2 | build | Build an image from a Dockerfile |
No.3 | commit | Create a new image from a container’s changes |
No.4 | cp | Copy files/folders between a container and the local filesystem |
No.5 | create | Create a new container |
No.6 | deploy | Create and update a stack from a Distributed Application Bundle (DAB) |
No.7 | diff | Inspect changes on a container’s filesystem |
No.8 | events | Get real time events from the server |
No.9 | exec | Run a command in a running container |
No.10 | export | Export a container’s filesystem as a tar archive |
No.11 | history | Show the history of an image |
No.12 | images | List images |
No.13 | import | Import the contents from a tarball to create a filesystem image |
No.14 | info | Display system-wide information |
No.15 | inspect | Return low-level information on a container, image or task |
No.16 | kill | Kill one or more running containers |
No.17 | load | Load an image from a tar archive or STDIN |
No.18 | login | Log in to a Docker registry. |
No.19 | logout | Log out from a Docker registry. |
No.20 | logs | Fetch the logs of a container |
No.21 | network | Manage Docker networks |
No.22 | node | Manage Docker Swarm nodes |
No.23 | pause | Pause all processes within one or more containers |
No.24 | plugin | Manage Docker plugins |
No.25 | port | List port mappings or a specific mapping for the container |
No.26 | ps | List containers |
No.27 | pull | Pull an image or a repository from a registry |
No.28 | push | Push an image or a repository to a registry |
No.29 | rename | Rename a container |
No.30 | restart | Restart a container |
No.31 | rm | Remove one or more containers |
No.32 | rmi | Remove one or more images |
No.33 | run | Run a command in a new container |
No.34 | save | Save one or more images to a tar archive (streamed to STDOUT by default) |
No.35 | search | Search the Docker Hub for images |
No.36 | service | Manage Docker services |
No.37 | stack | Manage Docker stacks |
No.38 | start | Start one or more stopped containers |
No.39 | stats | Display a live stream of container(s) resource usage statistics |
No.40 | stop | Stop one or more running containers |
No.41 | swarm | Manage Docker Swarm |
No.42 | tag | Tag an image into a repository |
No.43 | top | Display the running processes of a container |
No.44 | unpause | Unpause all processes within one or more containers |
No.45 | update | Update configuration of one or more containers |
No.46 | version | Show the Docker version information |
No.47 | volume | Manage Docker volumes |
No.48 | wait | Block until a container stops, then print its exit code |
再分享一下我老師大神的人工智慧教程吧。零基礎!通俗易懂!風趣幽默!還帶黃段子!希望你也加入到我們人工智慧的隊伍中來!https://www.cnblogs.com/captainbed