--- description: Compose file reference keywords: fig, composition, compose, docker redirect_from: - /compose/yml - /compose/compose-file-v3.md title: Compose file version 3 reference toc_max: 4 toc_min: 1 --- ## Reference and guidelines These topics describe version 3 of the Compose file format. This is the newest version. ## Compose and Docker compatibility matrix There are several versions of the Compose file format – 1, 2, 2.x, and 3.x. The table below is a quick look. For full details on what each version includes and how to upgrade, see **[About versions and upgrading](compose-versioning.md)**. {% include content/compose-matrix.md %} ## Compose file structure and examples The topics on this reference page are organized alphabetically by top-level key to reflect the structure of the Compose file itself. Top-level keys that define a section in the configuration file such as `build`, `deploy`, `depends_on`, `networks`, and so on, are listed with the options that support them as sub-topics. This maps to the `: