The docker-compose Tool

Let's begin the lesson by looking at what a multi-container setup is, why it is important, and how Docker, with the tool docker-compose, works like a charm in such scenarios.

We have recently been introduced to how applications work, with their separate elements: frontend, backend, and database.

To run such a multi-tier application using Docker, one would need to run the following commands to spin up the containers in different terminal sessions:

- docker run <front-end>
- docker run <back-end>
- docker run <database>


You can run docker run with (-d) as detached to prevent us from running the three commands in separate sessions, for example: docker run <front-end> -d

That said, it even becomes particularly tasking linking ...

Get Beginning DevOps with Docker now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.