It has been a little a over a year now since CircleCI began providing first-class Docker support. Docker Hub was brand-new at the time, and as with any new piece of tech, there was uncertainty about how exactly it would be received and adopted. Way back in mid-2014, there were minimal serious production hosting options, and Docker Hub was mostly a handy way to download and share base images, and maybe save yourself the headache of needing a Fortran compiler to install SciPy on your laptop.
Today, CircleCI has thousands of users taking advantage Docker in their CI and CD workflows. Since both CircleCI and Docker are so flexible, there are countless ways in which the two are being used together to speed up builds, wrangle dependencies, manage deployments, run integration tests, and more. A very common trend has been building and testing containers on CircleCI, pushing those containers to a Docker registry, and triggering deployments from there to production infrastructure.
This workflow has a number of significant benefits over alternative arrangements:
Builds produce very self-contained artifacts that can be saved and redeployed any time (e.g. in rollback scenarios).
Storing Docker images in a central registry with a well-defined API allows for them to be easily accessed by a number of consumers, such as developers pulling them to their laptops, other builds pulling down dependent services, builds pulling down base images, and of course production hosts.
It usually just takes a single API call to a production host that supports Docker to trigger the deployment of a new image version from the registry to production.
As the official, central Docker registry, Docker Hub is by far the most popular registry for CircleCI users. For just one example of how CircleCI users are streamlining their deployments with Docker Hub, check out the story of a team from Sony Japan that is using the CircleCI+Docker Hub combination in production to deploy core backend services that power some of Sony’s cloud products.
It seems pretty clear that Docker Hub is already an integral piece to countless teams’ deployment workflows, and the more Docker users embrace decoupled, microservices architectures, the more important it will be for them to use a centralized repository like Docker Hub to manage the ensuing explosion of container images.
It’s exciting to see that Docker is pushing hard to scale its projects to new heights with efforts like “The Docker Plumbing Project”, tools like Notary and Distribution, and providing better image provenance and registry performance. Oh, and Docker just announced the GA release of Docker Hub 2.0. We can’t wait to see what the next year of Docker Hub + CircleCI brings!