When I run docker history mysql
the last line is:
104de4492b99 9 days ago /bin/sh -c #(nop) ADD file:f35a56605b9a065a14 4.97 MB
I wanted to know what base image the id f35a56605b9a065a14
corresponds to, so I found the mysql Dockerfile on Github. The first line is:
FROM debian:wheezy
1) Can someone confirm that f35a56605b9a065a14
is indeed the id of the debian:wheezy
base image?
2) If I didn't have access to the Dockerfile, how would I go about making the connection that f35a56605b9a065a14
corresponds to debian:wheezy
?
Thanks
When you just have an image and want to recreate the Dockerfile, you can use dockerfile-from-image from
https://github.com/CenturyLinkLabs/dockerfile-from-image/blob/master/dockerfile-from-image.rb
it is some Ruby code (in a container, of course!) that find all the commands used.
And, yes f35... is the id of DEBIAN:WHEEZY, as
docker run -v /var/run/docker.sock:/var/run/docker.sock centurylink/dockerfile-from-image debian:wheezy
shows
ADD file:f35a56605b9a065a14a18d0e36fdf55c1c381d3521b4fa7f11173f0025d36839 in /
CMD ["/bin/bash"]
`
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With