Docker 文档给出:
docker image ls [OPTIONS] [REPOSITORY[:TAG]]
Run Code Online (Sandbox Code Playgroud)
但这假设您将指定一个存储库。
如何仅通过标签列出本地图像?
好问题!我正在玩docker image ls,发现你不必指定存储库。以下内容实际上有效:
# displays images with tag: latest
docker image ls *:latest
# displays all images but not those with: <none>
docker image ls *:*
Run Code Online (Sandbox Code Playgroud)
编辑:
docker image ls *:latest有一些不一致之处。我注意到有些图像没有显示,而docker image ls | grep latest显示了它们。如果我知道原因的话我会回来的...
Santhosh V更新:看起来需要在过滤器中指定一个特殊字符,例如docker image ls *\*:*考虑图像名称中的 \
| 归档时间: |
|
| 查看次数: |
15907 次 |
| 最近记录: |