拉镜像文件
QuintindeMacBook-Pro% docker pull centos:7
查看 image id
QuintindeMacBook-Pro% docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d3c5a983ba7b1 5e35e350ade1 "/bin/bash" About an hour ago Up 50 minutes infallible_mendel
启动镜像
QuintindeMacBook-Pro% docker run -d -i -t <IMAGE ID> /bin/bash
我这里 < IMAGE ID > 是 5e35e350ade1
进入容器
QuintindeMacBook-Pro% docker exec -it <CONTAINER ID> bash
我这里 < CONTAINER ID > 是 d3c5a983ba7b1