docker 查看鏡像信息,image 搜索docker_docker images命令-列出image

 2023-12-10 阅读 31 评论 0

摘要:images 列出image的作用Usage: docker images [OPTIONS] [NAME]List imagesdocker 查看鏡像信息?-a, --all=false Show all images (by default filter out the intermediate image layers)-f, --filter=[] Provide filter values (i.e. 'dangling=true'

images 列出image的作用Usage: docker images [OPTIONS] [NAME]

List images

docker 查看鏡像信息?-a, --all=false Show all images (by default filter out the intermediate image layers)

-f, --filter=[] Provide filter values (i.e. 'dangling=true')

--no-trunc=false Don't truncate output

docker查看所有容器命令,-q, --quiet=false Only show numeric IDs

The default?docker images? 顯示images的一些基礎信息

Listing the most recently created images$ sudo docker images | head

docker image是什么,REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE

77af4d6b9913 19 hours ago 1.089 GB

committest latest b6fa739cedf5 19 hours ago 1.089 GB

78a85c484f71 19 hours ago 1.089 GB

$ docker latest 30557a29d5ab 20 hours ago 1.089 GB

0124422dd9f9 20 hours ago 1.089 GB

18ad6fad3402 22 hours ago 1.082 GB

f9f1e26352f0 23 hours ago 1.089 GB

tryout latest 2629d1fa0b81 23 hours ago 131.5 MB

5ed6274db6ce 24 hours ago 1.089 GB

Listing the full length image IDs$ sudo docker images --no-trunc | head

REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE

77af4d6b9913e693e8d0b4b294fa62ade6054e6b2f1ffb617ac955dd63fb0182 19 hours ago 1.089 GB

committest latest b6fa739cedf5ea12a620a439402b6004d057da800f91c7524b5086a5e4749c9f 19 hours ago 1.089 GB

78a85c484f71509adeaace20e72e941f6bdd2b25b4c75da8693efd9f61a37921 19 hours ago 1.089 GB

$ docker latest 30557a29d5abc51e5f1d5b472e79b7e296f595abcf19fe6b9199dbbc809c6ff4 20 hours ago 1.089 GB

0124422dd9f9cf7ef15c0617cda3931ee68346455441d66ab8bdc5b05e9fdce5 20 hours ago 1.089 GB

18ad6fad340262ac2a636efd98a6d1f0ea775ae3d45240d3418466495a19a81b 22 hours ago 1.082 GB

f9f1e26352f0a3ba6a0ff68167559f64f3e21ff7ada60366e2d44a04befd1d3a 23 hours ago 1.089 GB

tryout latest 2629d1fa0b81b222fca63371ca16cbf6a0772d07759ff80e8d1369b926940074 23 hours ago 131.5 MB

5ed6274db6ceb2397844896966ea239290555e74ef307030ebb01ff91b1914df 24 hours ago 1.089 GB

Filtering 過濾

The filtering flag (-f?or?--filter) format is of "key=value". If there are more than one filter, then pass multiple flags (e.g.,?--filter "foo=bar" --filter "bif=baz")

Current filters: * dangling (boolean - true or false)

untagged images$ sudo docker images --filter "dangling=true"

REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE

8abc22fbb042 4 weeks ago 0 B

48e5f45168b9 4 weeks ago 2.489 MB

bf747efa0e2f 4 weeks ago 0 B

980fe10e5736 12 weeks ago 101.4 MB

dea752e4e117 12 weeks ago 101.4 MB

511136ea3c5a 8 months ago 0 B

This will display untagged images, that are the leaves of the images tree (not intermediary layers). These images occur when a new build of an image takes the repo:tag away from the IMAGE ID, leaving it untagged. A warning will be issued if trying to remove an image when a container is presently using it. By having this flag it allows for batch cleanup.

Ready for use by?docker rmi ..., like:$ sudo docker rmi $(sudo docker images -f "dangling=true" -q)

8abc22fbb042

48e5f45168b9

bf747efa0e2f

980fe10e5736

dea752e4e117

511136ea3c5a

NOTE: Docker will warn you if any containers exist that are using these untagged images.

版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。

原文链接:https://hbdhgg.com/5/194205.html

发表评论:

本站为非赢利网站,部分文章来源或改编自互联网及其他公众平台,主要目的在于分享信息,版权归原作者所有,内容仅供读者参考,如有侵权请联系我们删除!

Copyright © 2022 匯編語言學習筆記 Inc. 保留所有权利。

底部版权信息