XXX:~ XXX$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
centos 7.2.1511 9aec5c5fe4ba 2 months ago 195MB
redis latest ce25c7293564 5 months ago 95MB
rabbitmq management d69a5113ceae 7 months ago 149MB
openjdk 8-jre-alpine 2e01f547f003 7 months ago 83MB
mysql 8.0.12 ee1e8adfcefb 7 months ago 484MB
redis 3.2 87856cc39862 7 months ago 76MB
jplock/zookeeper 3.4.8 80e2f8f23445 3 years ago 155MB
4、创建容器:
XXX:~ XXX$ docker run --privileged=true -ti --name="centos7.test" 9aec5c5fe4ba
5、退出容器:
[root@cfe96728d356 /]# exit
exit
6、查看所有容器:
XXX:~ XXX$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
cfe96728d356 9aec5c5fe4ba "/bin/bash" 3 minutes ago Exited (0) About a minute ago centos7.test