1、查看docker版本
[root@localhost ~]# docker --version \\查看docker版本
Docker version 18.09.6, build 481bc77156
[root@localhost ~]# docker info \\查看有关Docker安装的更多详细信息
2、讲用户jason添加到docker组
[jason@localhost /]$ sudo usermod -aG docker jason
3、列出下载的image
[jason@localhost /]$ docker image ls REPOSITORY TAG IMAGE ID CREATED SIZE hello-world latest fce289e99eb9 4 months ago 1.84kB
4、列出 “hello-world” 运行完后的容器
[jason@localhost /]$ docker container ls -all CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ceaf33f28e51 hello-world "/hello" 2 minutes ago Exited (0) 2 minutes ago silly_torvalds
备忘:
## List Docker CLI commands
docker
docker container --help
## Display Docker version and info
docker --version
docker version
docker info
## Execute Docker image
docker run hello-world
## List Docker images
docker image ls
## List Docker containers (running, all, all in quiet mode)
docker container ls
docker container ls --all
docker container ls -aq
开始使用docker - Part 1: Orientation and setup
原文:https://www.cnblogs.com/ecsdoc/p/10897446.html