Compose Background
Let's explore the evolution of Docker Compose over time.
We'll cover the following
Multi-container management with Fig
When Docker was new, a company called Orchard Labs built a tool called Fig that made deploying and managing multi-container apps easy. It was a Python tool that ran on top of Docker and let you define complex multi-container microservices apps in a simple YAML file. You could even use the fig
command-line tool to manage the entire application lifecycle.
Behind the scenes, Fig would read the YAML file and call the appropriate Docker commands to deploy and manage the app.
From Fig to Docker Compose
Fig was so good that Docker, Inc. acquired Orchard Labs and rebranded Fig as Docker Compose. They renamed the command-line tool from fig
to docker-compose
and, more recently, folded it into the docker
CLI with its own compose
sub-command. We can now run simple docker compose
commands to easily manage multi-container microservices apps.
There is also a Compose Specification driving Compose as an open standard for defining multi-container microservices apps. The specification is community-led and kept separate from the Docker implementation to maintain better governance and clearer demarcation. However, Docker Compose is the reference implementation, and you should expect Docker to implement the full spec.
Reading the spec is also a great way to learn the details.
Installing Compose
All modern versions of Docker come with Docker Compose pre-installed, and you no longer need to install it as a separate application.
Test it with the following command. Be sure to use the docker compose
command instead of the older `docker-compose.
$ docker compose versionDocker Compose version v2.29.7
Playground
Click the Click to connect… button to connect the terminal and test all the commands mentioned above in this terminal.