Files
tldr/pages.zh/common/docker-images.md

28 lines
640 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# docker images
> 管理 Docker 镜像。
> 更多信息:<https://docs.docker.com/reference/cli/docker/image/ls/>。
- 列出所有 Docker 镜像:
`docker images`
- 列出所有 Docker 镜像,包括中间镜像:
`docker images --all`
- 以静默模式列出输出(仅显示数字 ID
`docker images --quiet`
- 列出未被任何容器使用的所有 Docker 镜像:
`docker images --filter dangling=true`
- 列出名称中包含子字符串的镜像:
`docker images "{{*name*}}"`
- 按大小排序镜像:
`docker images --format "\{\{.ID\}\}\t\{\{.Size\}\}\t\{\{.Repository\}\}:\{\{.Tag\}\}" | sort -k 2 -h`