Is it possible to extract the Dockerfile from a docker container

前端 未结 3 569
死守一世寂寞
死守一世寂寞 2020-12-23 20:32

I\'m just starting out with Docker, and it would be very helpful to be able to see the Dockerfiles used to create existing docker images.

Even if the image was buil

3条回答
  •  醉酒成梦
    2020-12-23 20:49

    There's a project dockerfile-from-image which could help you to do it directly.

    It requires a single CLI command to recover the Dockerfile:

    docker run -v /var/run/docker.sock:/var/run/docker.sock centurylink/dockerfile-from-image

    One has to have Docker already installed.

提交回复
热议问题