11 Building and testing applications with Docker and Docker Compose

 

Automation is at the heart of Docker. You describe the steps to package your component in a Dockerfile and use the Docker command line to execute them; you describe the architecture of your app in a Docker Compose file and use the Compose command line to start and stop the app. Command-line tools fit very neatly with automated processes, like jobs that run on a daily schedule or whenever developers push code changes. It doesn’t matter which tool you’re using to run those jobs; they all let you run scripted commands so you can easily integrate the Docker workflow with your automation server.

In this chapter you’re going to learn how to do continuous integration (CI) with Docker. CI is an automated process that runs regularly to build applications and execute a suite of tests. When the CI job is healthy, it means the latest code for the app is good and has been packaged and is ready to deploy as a release candidate. Setting up and managing CI servers and jobs used to be time consuming and intensive--“build manager” was a full-time role for a human in a large project. Docker simplifies every part of the CI process and frees people up for more interesting work.

11.1 How the CI process works with Docker

11.2 Spinning up build infrastructure with Docker

11.3 Capturing build settings with Docker Compose

11.4 Writing CI jobs with no dependencies except Docker

11.5 Understanding containers in the CI process

11.6 Lab

sitemap