# docker images 命令
該命令用于查看本地儲存的 Docker 鏡像。
## 語法
```
docker images [OPTIONS] [REPOSITORY[:TAG]]
```
## 常用參數
* -a:顯示所有鏡像,包括中間鏡像(懸掛鏡像),默認不顯示
* -f:過濾顯示,可選的值有:
<ul style="margin-left:20px;list-style-type:circle;">
<li>是否無標簽:$ docker images -f dangling=[true | false]
<li>標簽值:$ docker images -f label=<key>[=<value>]
<li>在某鏡像之前創建:$ docker images -f before=(<image-name>[:tag] | <image-id> | <image@digest>)
<li>在某鏡像之后創建:$ docker images -f since=(<image-name>[:tag] | <image-id> | <image@digest>)
</ul>
* -q:只顯示 id
## 實例
顯示所有鏡像
```
docker images
```
顯示所有擁有標簽鏡像
```
docker images -f dangling=false
```
顯示在 ubuntu 鏡像之后創建的所有鏡像
```
docker images -f since=ubuntu
```

## 幫助
```
$ docker images --help
Usage: docker images [OPTIONS] [REPOSITORY[:TAG]]
List images
Options:
-a, --all Show all images (default hides intermediate images)
--digests Show digests
-f, --filter filter Filter output based on conditions provided
--format string Pretty-print images using a Go template
--no-trunc Don't truncate output
-q, --quiet Only show numeric IDs
```
官方文檔:[https://docs.docker.com/engine/reference/commandline/images/]()
- 依附容器的 docker attach 命令
- 構建鏡像的 docker build 命令
- 提交容器的 docker commit 命令
- 復制文件到宿主機的 docker cp 命令
- 創建容器的 docker create 命令
- 查看容器變化的 docker diff 命令
- 查看事件的 docker events 命令
- 進入容器的 docker exec 命令
- 導出容器的 docker export 命令
- 查看鏡像歷史的 docker history 命令
- 查看本地鏡像的 docker images 命令
- 導入容器的 docker import 命令
- 查看 docker 信息的 docker info 命令
- 查看各項詳細信息的 docker inspect 命令
- 殺死容器的 docker kill 命令
- 導入鏡像的 docker load 命令