$ docker --version
Docker version 18.03.1-ce, build 9ee9f40
$ docker info
Containers: 1
Running: 0
Paused: 0
Stopped: 1
Images: 1
Server Version: 18.03.1-ce
Storage Driver: overlay2
镜像
# 列出本地镜像
$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest e38bc07ac18e 2 weeks ago 1.85kB
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest e38bc07ac18e 2 weeks ago 1.85kB
容器
# 列出所有容器(包括已经退出的)
$ docker container ls --all
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b77127cfd998 hello-world "/hello" 21 minutes ago Exited (0) 21 minutes ago romantic_brattain
Docker -- Part 1 命令汇总
https://docs.docker.com/get-started/
https://www.docker.com/use-cases/cicd
## 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