Exploring the basics of Docker Compose
In Chapter 1, Docker Overview, we discussed a few of the problems that Docker has been designed to solve. We explored how Docker addresses the challenges faced by a lot of development and operations teams. One such solution was to run two different application stacks side by side by isolating each application stack's processes into a single container. This lets you run two entirely different versions of the same software stack—let's say PHP 5.6 and PHP 7—on the same host, as we did in Chapter 2, Building Container Images.
Toward the end of Chapter 4, Managing Containers, we launched an application that was made up of multiple containers rather than running the required software stack in a single container. The example application we started, Moby Counter
, is written in Node.js and uses Redis as a backend to store key values, which in our case were the coordinates of the Docker logos on screen.
To be able to run the...