Currently it’s rather opaque to understand CircleCI Docker images. This post is meant to clear that up some more while we figure out ways to get around current limitations. *
Currently all images build from this public repo, but Dockerfiles for the language and runtime variants are generated. To view the dockerfiles for these images, you can check the green master builds for this repo. A green build will save new Dockerfiles as artifacts. Example.
One limitation of the above approach is that you may have to look across many builds to find the Dockerfile that you care about. For instance, job 2485 only generated a Dockerfile for Mysql 5.7.20 in the 5.7.x series. If you were looking for 5.7.18, you’d have to go back until you found when that Dockerfile was generated. One other option is to use
docker history --no-trunc <image_name>. This will give you an approximation of the Dockerfile used to generate that image, though you won’t be able to find the parent image (
In the long term we plan on making it easier to learn about our images on your own by linking Dockerfiles to their images on Dockerhub. In the mean time, hopefully this post will be helpful.
* The biggest one we’ve encountered is that there isn’t an easy way to associate a Dockerfile with an image tag on Dockerhub to get it showing up next to the tag name. This only seems to happen if you used the Dockerhub builder. This doesn’t suit how we’re currently automating image creation, as it seems to require one Github repo per Dockerfile repo.