How to view Docker image layers on Docker Hub?

大城市里の小女人 提交于 2020-12-30 05:33:04

问题


I know that I can use this command $ docker images --tree docker history to view the layers of a Docker image, but how do I do that for images on Docker Hub without pulling it? This is so that I know what is on an image before I download it.

E.g., for the Tomcat repo, https://registry.hub.docker.com/_/tomcat/, the webpage doesn't seem to show what is on the image. I have to look at the Dockerfile on Github to find out.

Update I see this repo https://registry.hub.docker.com/u/tutum/tomcat/ has more tabs. The "Dockerfile" tab shows how it is created, but only seems to show the latest version. Is there no choice to view the file for other tags?


回答1:


Docker Hub is quite limited at the moment and does not offer the feature you asked for.

When an image is configured to build from source at Docker Hub (an Automated Build) you can see what went into it, but when it is uploaded pre-built you have no information.




回答2:


Use microbadger, which comes with a few badges as well, eg:

So your tomcat image on https://microbadger.com/images/tomcat would look like:




回答3:


This is now possible by clicking into the image tag.



来源:https://stackoverflow.com/questions/27208367/how-to-view-docker-image-layers-on-docker-hub

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!