Docker从pull到启动容器的全过程

介绍docker的容器创建及使用的全流程。

$ docker pull fedora
Using default tag: latest
latest: Pulling from library/fedora
565884f490d9: Pull complete
Digest: sha256:166e65e720695024e6f89877f96a83ca2d0fd4863ae9afad4ca7f54fc0c4aed3
Status: Downloaded newer image for fedora:latest
$ docker create -it fedora bash
114ce4710bb29038af061f39c06e7c74986c7807459e0a75f3cdfbb1dc85f9f7
$ docker ps -a
CONTAINER ID        IMAGE                            COMMAND                  CREATED             STATUS                      PORTS                                                                                                                                NAMES
114ce4710bb2        fedora                           "bash"                   4 seconds ago       Created                                                                                                                                                          confident_einstein
 $ docker start confident_einstein
confident_einstein
$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
114ce4710bb2        fedora              "bash"              6 minutes ago       Up 5 minutes                            confident_einstein
$ docker exec -i -t confident_einstein bash
[root@114ce4710bb2 /]#

相关资料