Compose V1 no longer receives updates and will not be available in new releases of Docker Desktop after June 2023.

Compose V2 is included with all currently supported versions of Docker Desktop. For more information, see Migrate to Compose V2.

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.

Arrow pointing downwards

Status of the Specification

Read about the status of the specification.

Data disks

The Compose application model

Learn about the Compose application model.

Computers on a local area network

The Compose file

Understand the Compose file.

Document with a text outline

Version and name top-level element

Understand version and name attributes for Compose.

A pair of scissors

Services top-level element

Explore all services attributes for Compose.

Settings cogwheel with stars

Networks top-level element

Find all networks attributes for Compose.

Checkered shield

Volumes top-level element

Explore all volumes attributes for Compose.

Alarm bell with an exclamation mark

Configs top-level element

Find out about configs in Compose.

Document with an overlaying plus sign

Secrets top-level element

Learn about secrets in Compose.