Overview
Important
From the end of June 2023 Compose V1 won’t be supported anymore and will be removed from all Docker Desktop versions.
Make sure you switch to Compose V2 with the
docker compose
CLI plugin or by activating the Use Docker Compose V2 setting in Docker Desktop. For more information, see the Evolution of Compose
The Compose file is a YAML file defining services, networks, and volumes for a Docker application. The latest and recommended version of the Compose file format is defined by the Compose Specification. The Compose spec merges the legacy 2.x and 3.x versions, aggregating properties across these formats and is implemented by Compose 1.27.0+.
Use the links below to easily navigate key sections of the Compose specification.
Status of the Specification
Read about the status of the specification.
The Compose application model
Learn about the Compose application model.
The Compose file
Understand the Compose file.
Version and name top-level element
Understand version and name attributes for Compose.
Services top-level element
Explore all services attributes for Compose.
Networks top-level element
Find all networks attributes for Compose.
Volumes top-level element
Explore all volumes attributes for Compose.
Configs top-level element
Find out about configs in Compose.
Secrets top-level element
Learn about secrets in Compose.