Docker创建容器
root@docker ~]# docker create -it docker.io/ubuntu:latest
5bd73ca9dcdb9f5ba8b01ad56662ef16482044801e1224528ded8b4bff42becc
查看容器进程
[root@docker ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5bd73ca9dcdb docker.io/ubuntu:latest "/bin/bash" 9 seconds ago Created
启动创建的容器
[root@docker ~]# docker start 5bd73ca9dcd
5bd73ca9dcd
再次查看容器进程
[root@docker ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5bd73ca9dcdb docker.io/ubuntu:latest "/bin/bash" 3 minutes ago Up 8 seconds sad_brahmagupta
Docker新建并启动容器
[root@docker ~]# docker run -t -i docker.io/ubuntu:latest /bin/bash
root@11c1437847cb:/#