## Docker常用命令介绍
### 一、帮助命令
* `docker version`
* `docker info`
* `docker --help`
* `docker run --help` 查看`run`命令示例
### 二、镜像命令
- `docker images` 查看镜像
- -a 列出所有镜像
- -q 只显示镜像id
- --digests 显示摘要信息
- --no-trunc
- `docker search` 搜索镜像
```shell
#docker search 镜像名
[root@localhost docker]# docker search tomcat
```
- `docker pull` 下载镜像
```shell
#docker pull 镜像名
[root@localhost docker]# docker pull tomcat
```
- `docker rmi` 删除镜像
- 删除单个`docker rmi -f 镜像名`
- 删除多个`docker rmi -f 镜像名1:tag1 镜像名2:tag2`
- 删除全部`docker rmi -f ${docker images -q}`
- `docker commit `将现有容器制作为镜像
```shell
#docker commit -m="描述信息" -a="作者" 容器id 目标镜像名:[标签]
[root@localhost docker]# docker commit -m="描述信息" -a="作者" b4vfd