Docker安装并启动
1 2 3
| [root@docker ~] [root@docker ~]
|
Docker测试
从docker.com获取centos镜像 docker pull centosget
1 2 3 4 5 6 7
| [root@docker ~] Using default tag: latest Trying to pull repository docker.io/library/centos ... latest: Pulling from docker.io/library/centos 45a2e645736c: Pull complete Digest: sha256:c577af3197aacedf79c5a204cd7f493c8e07ffbce7f88f7600bf19c688c38799 Status: Downloaded newer image for docker.io/centos:latest
|
docker images 查看本地都有哪些镜像
1 2 3
| [root@docker ~] REPOSITORY TAG IMAGE ID CREATED SIZE docker.io/centos latest 67591570dd29 5 weeks ago 191.8 MB
|
使用在下镜像开启容器
docker ps 查看运行的容器,加上 -a 选项可以查看有没有运行的容器
1 2 3
| [root@docker ~] CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 6e35c7590c0e centos "/bin/bash" 2 minutes ago Exited (0) About a minute ago desperate_jepsen
|