查找每个 Docker 镜像的层和层大小 [英] Finding the layers and layer sizes for each Docker image

查看:141
本文介绍了查找每个 Docker 镜像的层和层大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于研究目的,我试图抓取公共 Docker 注册表(https://registry.hub.docker.com/a> ) 并找出 1) 平均图像有多少层以及 2) 这些层的大小以了解分布.

For research purposes I'm trying to crawl the public Docker registry ( https://registry.hub.docker.com/ ) and find out 1) how many layers an average image has and 2) the sizes of these layers to get an idea of the distribution.

然而我研究了API和公共库以及github上的细节,但我找不到任何方法:

However I studied the API and public libraries as well as the details on the github but I cant find any method to:

  • 检索所有公共存储库/图像(即使有数千个,我仍然需要一个起始列表来迭代)
  • 查找图像的所有图层
  • 找到层的大小(不是图像,而是单个层).

谁能帮我找到检索这些信息的方法?

Can anyone help me find a way to retrieve this information?

谢谢!

是否有人能够验证在 Docker 注册表中搜索*"会返回所有存储库,而不仅仅是在任何地方提到*"的任何内容?https://registry.hub.docker.com/search?q=*

is anyone able to verify that searching for '*' in Docker registry is returning all the repositories and not just anything that mentions '*' anywhere? https://registry.hub.docker.com/search?q=*

推荐答案

查看用 golang 编写的 dive.

Check out dive written in golang.

很棒的工具!

这篇关于查找每个 Docker 镜像的层和层大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆