Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,988 changes: 0 additions & 1,988 deletions content/compose/compose-file/compose-file-v2.md

This file was deleted.

2,764 changes: 0 additions & 2,764 deletions content/compose/compose-file/compose-file-v3.md

This file was deleted.

535 changes: 0 additions & 535 deletions content/compose/compose-file/compose-versioning.md

This file was deleted.

13 changes: 13 additions & 0 deletions content/compose/compose-file/legacy-versions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Legacy versions
description:
keywords: fig, composition, compose, versions, upgrading, docker, version 3, docker compose 3
aliases:
- /compose/compose-file/compose-versioning/
- /compose/compose-file/compose-file-v3/
- /compose/compose-file/compose-file-v2/
---

The legacy versions of the Compose file reference has moved to the [V1 branch of the Compose repository](https://github.com/docker/compose/tree/v1/docs). They are no longer being actively maintained.

The latest and recommended version of the Compose file format is defined by the [Compose Specification](_index.md). This format merges the 2.x and 3.x versions and is implemented by **Compose 1.27.0+**. For more information, see the[History and development of Docker Compose](../intro/history.md).
6 changes: 3 additions & 3 deletions content/compose/intro/history.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ Compose V2 ignores the `version` top-level element in the `compose.yml` file.
The Docker Compose CLIs are defined by specific file formats.

Three major versions of the Compose file format for Compose V1 were released:
- [Compose file format 1](../compose-file/compose-versioning.md##version-1-to-2x) with Compose 1.0.0 in 2014
- [Compose file format 2.x](../compose-file/compose-file-v2.md) with Compose 1.6.0 in 2016
- [Compose file format 3.x](../compose-file/compose-file-v3.md) with Compose 1.10.0 in 2017
- Compose file format 1 with Compose 1.0.0 in 2014
- Compose file format 2.x with Compose 1.6.0 in 2016
- Compose file format 3.x with Compose 1.10.0 in 2017

Compose file format 1 is substantially different to all the following formats as it lacks a top-level `services` key.
Its usage is historical and files written in this format don't run with Compose V2.
Expand Down
4 changes: 2 additions & 2 deletions content/compose/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2209,7 +2209,7 @@ naming scheme accordingly before upgrading.

- Added support for `extra_hosts` in build configuration

- Added support for the [long syntax](compose-file/compose-file-v3.md#long-syntax-3) for volume entries, as previously introduced in the 3.2 format.
- Added support for the [long syntax](compose-file/legacy-versions.md) for volume entries, as previously introduced in the 3.2 format.
Using this syntax will create [mounts](../storage/bind-mounts.md) instead of volumes.

#### Compose file version 2.1 and up
Expand Down Expand Up @@ -3145,7 +3145,7 @@ naming scheme accordingly before upgrading.
You don't have to use it - your existing Compose files will run on Compose
1.6 exactly as they do today.

Check the [upgrade guide](../compose/compose-file/compose-versioning.md#upgrading)
Check the [upgrade guide](../compose/compose-file/legacy-versions.md)
for full details.

- Support for networking has exited experimental status and is the recommended
Expand Down
2 changes: 1 addition & 1 deletion content/engine/swarm/configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Docker configs.

The `docker stack` command supports defining configs in a Compose file.
However, the `configs` key is not supported for `docker compose`. See
[the Compose file reference](../../compose/compose-file/compose-file-v3.md#configs) for details.
[the Compose file reference](../../compose/compose-file/legacy-versions.md) for details.

### Simple example: Get started with configs

Expand Down
2 changes: 1 addition & 1 deletion content/engine/swarm/secrets.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ a similar way, see

Both the `docker-compose` and `docker stack` commands support defining secrets
in a compose file. See
[the Compose file reference](../../compose/compose-file/compose-file-v3.md#secrets) for details.
[the Compose file reference](../../compose/compose-file/legacy-versions.md) for details.

### Simple example: Get started with secrets

Expand Down
2 changes: 1 addition & 1 deletion content/engine/swarm/stack-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Deploy a stack to a swarm

When running Docker Engine in swarm mode, you can use `docker stack deploy` to
deploy a complete application stack to the swarm. The `deploy` command accepts
a stack description in the form of a [Compose file](../../compose/compose-file/compose-file-v3.md).
a stack description in the form of a [Compose file](../../compose/compose-file/legacy-versions.md).

{{< include "swarm-compose-compat.md" >}}

Expand Down
77 changes: 0 additions & 77 deletions content/includes/content/compose-extfields-sub.md

This file was deleted.

29 changes: 0 additions & 29 deletions content/includes/content/compose-matrix.md

This file was deleted.

66 changes: 0 additions & 66 deletions content/includes/content/compose-var-sub.md

This file was deleted.

6 changes: 3 additions & 3 deletions content/language/golang/develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -593,12 +593,12 @@ You aren't going to cover any of these advanced use cases here.

### Variable substitution in Docker Compose

One of the really cool features of Docker Compose is [variable substitution](../../compose/compose-file/compose-file-v3.md#variable-substitution). You can see some examples in the Compose file, `environment` section. By means of an example:
One of the really cool features of Docker Compose is [variable substitution](../../compose/compose-file/12-interpolation.md). You can see some examples in the Compose file, `environment` section. By means of an example:

* `PGUSER=${PGUSER:-totoro}` means that inside the container, the environment variable `PGUSER` shall be set to the same value as it has on the host machine where Docker Compose is run. If there is no environment variable with this name on the host machine, the variable inside the container gets the default value of `totoro`.
* `PGPASSWORD=${PGPASSWORD:?database password not set}` means that if the environment variable `PGPASSWORD` isn't set on the host, Docker Compose will display an error. This is OK, because you don't want to hard-code default values for the password. You set the password value in the `.env` file, which is local to your machine. It is always a good idea to add `.env` to `.gitignore` to prevent the secrets being checked into the version control.

Other ways of dealing with undefined or empty values exist, as documented in the [variable substitution](../../compose/compose-file/compose-file-v3.md#variable-substitution) section of the Docker documentation.
Other ways of dealing with undefined or empty values exist, as documented in the [variable substitution](../../compose/compose-file/12-interpolation.md) section of the Docker documentation.

### Validating Docker Compose configuration

Expand Down Expand Up @@ -722,7 +722,7 @@ Such distributed set-up offers interesting possibilities, such as applying Chaos
If you are interested in experimenting with CockroachDB clusters, check out:

* [Start a CockroachDB Cluster in Docker](https://www.cockroachlabs.com/docs/v20.2/start-a-local-cluster-in-docker-mac.html) article; and
* Documentation for Docker Compose keywords [`deploy`](../../compose/compose-file/compose-file-v3.md#deploy) and [`replicas`](../../compose/compose-file/compose-file-v3.md#replicas).
* Documentation for Docker Compose keywords [`deploy`](../../compose/compose-file/legacy-versions.md) and [`replicas`](../../compose/compose-file/legacy-versions.md).

### Other databases

Expand Down
4 changes: 2 additions & 2 deletions content/storage/bind-mounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -418,9 +418,9 @@ volumes:
```

For more information about using volumes of the `bind` type with Compose, see
[Compose reference on volumes](../compose/compose-file/compose-file-v3.md#volumes).
[Compose reference on volumes](../compose/compose-file/05-services.md#volumes).
and
[Compose reference on volume configuration](../compose/compose-file/compose-file-v3.md#volume-configuration-reference).
[Compose reference on volume configuration](../compose/compose-file/05-services.md#volumes).

## Next steps

Expand Down
10 changes: 2 additions & 8 deletions data/toc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1008,14 +1008,8 @@ Reference:
title: Compose Deploy Specification
- path: /compose/compose-file/develop/
title: Compose Develop Specification
- sectiontitle: Legacy versions
section:
- path: /compose/compose-file/compose-versioning/
title: About versions and upgrading
- path: /compose/compose-file/compose-file-v3/
title: Version 3
- path: /compose/compose-file/compose-file-v2/
title: Version 2
- path: /compose/compose-file/legacy-versions/
title: Legacy versions
- path: /glossary/
title: Glossary
- sectiontitle: Samples
Expand Down