How can I see Dockerfile for each docker image?

后端 未结 3 820
离开以前
离开以前 2021-02-07 06:17

I have the following docker images.

$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
hello-world         late         


        
3条回答
  •  庸人自扰
    2021-02-07 06:23

    You can also regenerate the dockerfile from an image or use the docker history command to see what is inside. check this: Link to answer

    TL;DR So if you have a docker image that was built by a dockerfile, you can recover this information (All except from the original FROM command, which is important, I’ll grant that. But you can often guess it, especially by entering the container and asking “What os are you?”). However, the maker of the image could have manual steps that you’d never know about anyways, plus they COULD just export an image, and re-import it and there would be no intermediate images at that point.

提交回复
热议问题