Discovering CircleCI dockerfiles


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 (FROM).

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.


We’ve made some changes so that Dockerfiles for our convenience images easier to find!

All Dockerfiles will be published here:

The eventual flow will be that the master branch of circleci-dockerfiles will track all images published to; whereas the staging branch will track all images published to (our current staging area for changes to convenience images)—this flow is not quite in place yet, but, for now, both branches should have Dockerfiles for our full lineup of convenience images, organized by image and then by tag.

We’ll be gradually updating our documentation in various places to better publicize this information.