0

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?

user4948798
  • 1,924
  • 4
  • 43
  • 89

2 Answers2

1

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

KeepCalmAndCarryOn
  • 8,817
  • 2
  • 32
  • 47
0

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

enter image description here

quoc9x
  • 1,423
  • 2
  • 9
  • 26