Q
Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

What are the benefits of integrating a CI tool with Docker?

If you're moving toward DevOps, consider the benefits of integrating a CI tool with Docker. Learn why this step is necessary and how best to go about integration steps.

With the rise of DevOps, continuous integration tools came to prominence. The leading CI tool, of course, is Jenkins....

But there are other capable ones like CircleCI and GitLab CI. Let's look at why you would want to integrate Docker with one of these CI tools and how you can get started with the integration.

Why integrate Docker with your CI tool?

DevOps is about moving to continuous integration and continuous delivery (CD). This means every step of the software lifecycle should be programmatic, repeatable and automated. This is not possible if your dev, quality assurance and ops teams work in silos. They need to be integrated using a common platform -- a CI tool and a common way to package applications -- like Docker.

Once integrated, you can use the same containers consistently across dev, test and production and avoid the annoying "works on my machine" syndrome.

It's easy to get started with CI process, but extending it to CD isn't as easy. If you plan on graduating from CI to CD, you need to integrate Docker with your CI tool.

What happens when you integrate them?

Here's a flow of what happens when your CI tool and Docker work together across your development pipeline.

CI tools

These are the actions your CI tool takes, in order:

  1. Builds the Docker image from your repository
  2. Tests the Docker image against your test suite
  3. Pushes the Docker image to Docker Hub or a private registry
  4. Deploys the image to a cloud host

As you can see, integrating Docker with your CI tool benefits your entire development pipeline from development to production.

How to integrate Docker with CI tools

Jenkins uses a bunch of plug-ins to integrate with Docker. Here's the list of plug-ins:

Each of these plug-ins serves a different purpose across the pipeline.

CircleCI doesn't use plug-ins, instead it requires you to work with a circle.yml file. You'll need to make Docker a required service in your circle.yml file by adding the following text to it:

machine:
 services:
  - docker

Once enabled, you can use Docker commands throughout your circle.yml file. This includes commands like docker build, docker pull and docker push. The commands will be automatically triggered based on events that your CI tool watches for.

Integrating Docker and your CI tool is a vital step in your move to DevOps. It brings consistency and the power of automation across your pipeline. We looked at how to get setup with two popular CI tools -- Jenkins and CircleCI. You can find similar how-to information for other CI tools as well. Build apps the DevOps way by integrating Docker and your CI tool today.

Next Steps

What are the benefits of containers with Docker?

The drawbacks of Docker instances

Is your CI process working?

This was last published in March 2017

PRO+

Content

Find more PRO+ content and other member only offers, here.

Essential Guide

An essential guide to software container usability and management

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Join the conversation

1 comment

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

How has your enterprise integrated CI tools with Docker?
Cancel

-ADS BY GOOGLE

SearchSoftwareQuality

SearchCloudApplications

SearchAWS

TheServerSide

SearchWinDevelopment

Close