Finding the layers and layer sizes for each Docker image

后端 未结 11 1714
自闭症患者
自闭症患者 2020-12-04 06:47

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 si

11条回答
  •  盖世英雄少女心
    2020-12-04 07:26

    Not exactly the original question but to find the sum total of all the images without double-counting shared layers, the following is useful (ubuntu 18):

    sudo du -h -d1  /var/lib/docker/overlay2 | sort -h
    

提交回复
热议问题