One of our X
employee has created an docker image. Currently i need to update the same image which was created by him. But unfortunately i couldn't find the Dockerfile
for the image.
Is it possible to generate a dockerfile from an image?
One of our X
employee has created an docker image. Currently i need to update the same image which was created by him. But unfortunately i couldn't find the Dockerfile
for the image.
Is it possible to generate a dockerfile from an image?
this answer is good from here
This worked for me from the answers
docker pull chenzj/dfimage
alias dfimage="docker run -v /var/run/docker.sock:/var/run/docker.sock --rm chenzj/dfimage"
dfimage image_id
you need the image id - not the name
e.g
$docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
so the third column.
There is still work to do with it and it all depends how the docker image was created
You can try running this command:
alias dfimage="docker run -v /var/run/docker.sock:/var/run/docker.sock --rm alpine/dfimage"
dfimage -sV=1.36 IMAGE_NAME:IMAGE_TAG
And note at Dockerfile