Robert Fraser
Robert Fraser

Reputation: 10927

Where to see the Dockerfile for a docker image?

Is there a way to see the Dockerfile that generated an image I downloaded, to use as a template for my own docker images?

Upvotes: 8

Views: 3736

Answers (1)

Xiongbing Jin
Xiongbing Jin

Reputation: 12087

Use

docker history --no-trunc IMAGE_NAME_OR_ID

This will show all commands run in the image building process in reverse order. It's not exactly a Dockerfile, but you can find all essential content.

Upvotes: 15

Related Questions