Docke 1 12 基础篇 48条命令 1

Posted firsttry

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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 ~]#
  • 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的版本升上去之前下面的方法应该会一直会有效。刚刚再次试验过,目前仍然有效。

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://blog.csdn.net/jiangjunshow

以上是关于Docke 1 12 基础篇 48条命令 1的主要内容,如果未能解决你的问题,请参考以下文章

Docke 1 12 基础篇 48条命令 3

Docke 1 12 基础篇 48条命令 1

Docke 1 12 基础篇 48条命令 1

Docke--基础篇

docke--Dockerfile构建docker镜像

视觉基础篇14 # 如何使用片元着色器进行几何造型?