运行第一个容器
[root@localhost ~]# docker run -i -t centos /bin/bash
Unable to find image 'centos:latest' locally
latest: Pulling from library/centos
8ba884070f61: Pull complete
Digest: sha256:8d487d68857f5bc9595793279b33d082b03713341ddec91054382641d14db861
Status: Downloaded newer image for centos:latest
[root@dd77efe3aa68 /]#
查看当前系统中容器的列表
[root@localhost ~]# docker ps -a #查看当前中容器的列表
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
dd77efe3aa68 centos "/bin/bash" 2 minutes ago Exited (0) About a minute ago determined_lehmann
88b7cea2ef07 nginx "/bin/bash" 2 weeks ago Exited (130) 2 weeks ago objective_