1启动docker
$ systemctl status docker root(查看状态如果未启动就执行下面命令)
$ systemctl start docker root
2 下载centos 镜像
$ docker search centos (先查询)
$ docker pull centos:7.2.1511
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
centos 7.2.1511 61ea52df69fb 7 weeks ago 194.6 MB
3.登录centos
$ docker run -ti 61ea52df69fb /bin/bash (进去了)
4.退出
Ctrl-D
或
$ exit