Add the image chapter

This commit is contained in:
Baohua Yang
2014-09-05 15:50:31 +08:00
parent af33005a6b
commit 096fcda9fd
7 changed files with 222 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
##获取images
我们如何获取新的images呢当我们启动容器使用的image不再本地主机上时docker会自动下载他们。这很耗时我们可以使用docker pull命令来预先下载我们需要的image。下面的例子下载一个centos镜像。
```
$ sudo docker pull centos
Pulling repository centos
b7de3133ff98: Pulling dependent layers
5cc9e91966f7: Pulling fs layer
511136ea3c5a: Download complete
ef52fb1fe610: Download complete
```
我们可以看到下载的image的每一个层次这样当我们使用这个image来启动容器的时候它就可以马上启动了。
```
$ sudo docker run -t -i centos /bin/bash
bash-4.1#
```