What is Docker Compose?
Docker Compose is a tool for defining and running multi-container applications from a single YAML configuration file. It lets you do things like:
- Start, stop, and rebuild services
- View the status of running services
- Stream the log output of running services
- Run a one-off command on a service
What is Docker Compose used for?
Development environments
You define your application’s dependencies in a single file and can run to start your application.
Automated testing environments
You define your application’s dependencies in a single file and can run to prepare your application for testing so that you can do something like:
docker compose up -d
./run_tests
docker compose down
Single host deployments
If your application will run on a single host machine, you can use Docker Compose in production too.