The Whole Shebang: Compose Files

I have recently been writing and teaching a lot about Docker and containers in general. I’m very appreciative of those of you who consume my content and provide feedback. I hear you and naturally, the next topic to be tackled is Docker Compose — because since now you know how to build your own container images and run them, the next logical milestone is to create complex multi-container applications and manage all that as a single piece of software.

Docker Compose: What is it and Why do I need it?

Compose is a tool for defining and running multi-container Docker applications.

You can read more about it from the official docs, but to simplify, consider the following: you use Docker to manage containers, images, volumes, etc. When you do docker run you are basically executing a single container. If you want to start a second container, that somehow interacts with the first one, you’ll need to run docker run again, and take care of their volumes and networks separately, such that they can see and communicate with each other.

Docker Compose abstracts all of this, by providing a wrapper on top of Docker (yes! Docker Compose is simply a high-level CLI for Docker). In fact, you’ll see that most options are named in a very similar way to the ones available in the docker run subcommand.

Click Here

Tags: Docker Shebang