Docker 镜像基本命令
- 列出本地所有镜像
docker images [OPTIONS] [REPOSITORY[:TAG]]
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
- 在远端仓库搜索镜像
docker search [OPTIONS] TERM
Options:
-f, --filter filter Filter output based on conditions provided
–format string Pretty-print search using a Go template
–limit int Max number of search results (default 25)
–no-trunc Don’t truncate output
- 从远端仓库拉取镜像
docker pull [OPTIONS] NAME[:TAG|@DIGEST]
Options:
-a, --all-tags Download all tagged images in the repository
–disable-content-trust Skip image verification (default true)
-q, --quiet Suppress verbose output
- 删除镜像
docker rmi [OPTIONS] IMAGE [IMAGE...]
Options:
-f, --force Force removal of the image
–no-prune Do not delete untagged parents
镜像终结者:docker rmi -f $(docker images -qa)