Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to see the Dockerfile for a docker image?

Tags:

docker

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

like image 651
Robert Fraser Avatar asked May 05 '16 19:05

Robert Fraser


1 Answers

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.

like image 96
Xiongbing Jin Avatar answered Oct 05 '22 09:10

Xiongbing Jin