From 01d593c5a03d5ac8168f3050db5e34c227f330de Mon Sep 17 00:00:00 2001 From: aevesdocker Date: Tue, 6 Jan 2026 08:54:15 +0000 Subject: [PATCH 1/3] ENGDOCS-3131 --- content/manuals/compose/_index.md | 1 + .../compose/how-tos/environment-variables/envvars.md | 1 - content/manuals/compose/how-tos/gpu-support.md | 1 - content/manuals/compose/intro/history.md | 3 +-- content/manuals/desktop/previous-versions/3.x-mac.md | 6 +++--- content/manuals/desktop/previous-versions/3.x-windows.md | 6 +++--- content/manuals/desktop/release-notes.md | 4 ++-- 7 files changed, 10 insertions(+), 12 deletions(-) diff --git a/content/manuals/compose/_index.md b/content/manuals/compose/_index.md index 79d08ec6bff3..99a84ed8b2f8 100644 --- a/content/manuals/compose/_index.md +++ b/content/manuals/compose/_index.md @@ -52,6 +52,7 @@ aliases: - /compose/overview/ - /compose/swarm/ - /compose/completion/ +- /compose/releases/migrate/ --- Docker Compose is a tool for defining and running multi-container applications. diff --git a/content/manuals/compose/how-tos/environment-variables/envvars.md b/content/manuals/compose/how-tos/environment-variables/envvars.md index 11ac8b64aeda..02ca4cde4f65 100644 --- a/content/manuals/compose/how-tos/environment-variables/envvars.md +++ b/content/manuals/compose/how-tos/environment-variables/envvars.md @@ -224,7 +224,6 @@ This is an opt-out variable. When turned off it deactivates the experimental fea ## Unsupported in Compose V2 The following environment variables have no effect in Compose V2. -For more information, see [Migrate to Compose V2](/manuals/compose/releases/migrate.md). - `COMPOSE_API_VERSION` By default the API version is negotiated with the server. Use `DOCKER_API_VERSION`. diff --git a/content/manuals/compose/how-tos/gpu-support.md b/content/manuals/compose/how-tos/gpu-support.md index 8bbd955cb591..eeb7919c4162 100644 --- a/content/manuals/compose/how-tos/gpu-support.md +++ b/content/manuals/compose/how-tos/gpu-support.md @@ -11,7 +11,6 @@ aliases: Compose services can define GPU device reservations if the Docker host contains such devices and the Docker Daemon is set accordingly. For this, make sure you install the [prerequisites](/manuals/engine/containers/resource_constraints.md#gpu) if you haven't already done so. The examples in the following sections focus specifically on providing service containers access to GPU devices with Docker Compose. -You can use either `docker-compose` or `docker compose` commands. For more information, see [Migrate to Compose V2](/manuals/compose/releases/migrate.md). ## Enabling GPU access to service containers diff --git a/content/manuals/compose/intro/history.md b/content/manuals/compose/intro/history.md index a46cc78297ce..1297c4ff7503 100644 --- a/content/manuals/compose/intro/history.md +++ b/content/manuals/compose/intro/history.md @@ -47,10 +47,9 @@ To address confusion around Compose CLI versioning, Compose file format versioni Compose v2 uses the Compose Specification for project definition. Unlike the prior file formats, the Compose Specification is rolling and makes the `version` top-level element optional. Compose v2 also makes use of optional specifications - [Deploy](/reference/compose-file/deploy.md), [Develop](/reference/compose-file/develop.md), and [Build](/reference/compose-file/build.md). -To make [migration](/manuals/compose/releases/migrate.md) easier, Compose v2 has backwards compatibility for certain elements that have been deprecated or changed between Compose file format 2.x/3.x and the Compose Specification. +To make migration easier, Compose v2 has backwards compatibility for certain elements that have been deprecated or changed between Compose file format 2.x/3.x and the Compose Specification. ## What's next? - [How Compose works](compose-application-model.md) - [Compose Specification reference](/reference/compose-file/_index.md) -- [Migrate from Compose v1 to v2](/manuals/compose/releases/migrate.md) diff --git a/content/manuals/desktop/previous-versions/3.x-mac.md b/content/manuals/desktop/previous-versions/3.x-mac.md index fe1ca74e4a2d..edf1038b5060 100644 --- a/content/manuals/desktop/previous-versions/3.x-mac.md +++ b/content/manuals/desktop/previous-versions/3.x-mac.md @@ -79,7 +79,7 @@ This page contains release notes for Docker Desktop for Mac 3.x. **Dev Environments Preview**: Dev Environments enable you to seamlessly collaborate with your team members without moving between Git branches to get your code onto your team members' machines. When using Dev Environments, you can share your in-progress work with your team members in just one click, and without having to deal with any merge conflicts. -**Compose V2 beta**: Docker Desktop now includes the beta version of Compose V2, which supports the `docker compose` command as part of the Docker CLI. While `docker-compose` is still supported and maintained, Compose V2 implementation relies directly on the compose-go bindings which are maintained as part of the specification. The compose command in the Docker CLI supports most of the `docker-compose` commands and flags. It is expected to be a drop-in replacement for `docker-compose`. There are a few remaining flags that have yet to be implemented, see the [docker-compose compatibility list](/manuals/compose/releases/migrate.md) for more information about the flags that are supported in the new compose command. If you run into any problems with Compose V2, you can easily switch back to Compose v1 by either by making changes in Docker Desktop **Experimental** Settings, or by running the command `docker-compose disable-v2`. Let us know your feedback on the new ‘compose’ command by creating an issue in the [Compose-CLI](https://github.com/docker/compose-cli/issues) GitHub repository. +**Compose V2 beta**: Docker Desktop now includes the beta version of Compose V2, which supports the `docker compose` command as part of the Docker CLI. While `docker-compose` is still supported and maintained, Compose V2 implementation relies directly on the compose-go bindings which are maintained as part of the specification. The compose command in the Docker CLI supports most of the `docker-compose` commands and flags. It is expected to be a drop-in replacement for `docker-compose`. There are a few remaining flags that have yet to be implemented, see the docker-compose compatibility list for more information about the flags that are supported in the new compose command. If you run into any problems with Compose V2, you can easily switch back to Compose v1 by either by making changes in Docker Desktop **Experimental** Settings, or by running the command `docker-compose disable-v2`. Let us know your feedback on the new ‘compose’ command by creating an issue in the [Compose-CLI](https://github.com/docker/compose-cli/issues) GitHub repository. ### Bug fixes and minor changes @@ -92,7 +92,7 @@ This page contains release notes for Docker Desktop for Mac 3.x. **Dev Environments Preview**: Dev Environments enable you to seamlessly collaborate with your team members without moving between Git branches to get your code onto your team members' machines. When using Dev Environments, you can share your in-progress work with your team members in just one click, and without having to deal with any merge conflicts. -**Compose V2 beta**: Docker Desktop now includes the beta version of Compose V2, which supports the `docker compose` command as part of the Docker CLI. While `docker-compose` is still supported and maintained, Compose V2 implementation relies directly on the compose-go bindings which are maintained as part of the specification. The compose command in the Docker CLI supports most of the `docker-compose` commands and flags. It is expected to be a drop-in replacement for `docker-compose`. There are a few remaining flags that have yet to be implemented, see the [docker-compose compatibility list](/manuals/compose/releases/migrate.md) for more information about the flags that are supported in the new compose command. If you run into any problems with Compose V2, you can easily switch back to Compose v1 by either by making changes in Docker Desktop **Experimental** Settings, or by running the command `docker-compose disable-v2`. Let us know your feedback on the new ‘compose’ command by creating an issue in the [Compose-CLI](https://github.com/docker/compose-cli/issues) GitHub repository. +**Compose V2 beta**: Docker Desktop now includes the beta version of Compose V2, which supports the `docker compose` command as part of the Docker CLI. While `docker-compose` is still supported and maintained, Compose V2 implementation relies directly on the compose-go bindings which are maintained as part of the specification. The compose command in the Docker CLI supports most of the `docker-compose` commands and flags. It is expected to be a drop-in replacement for `docker-compose`. There are a few remaining flags that have yet to be implemented, see the docker-compose compatibility list for more information about the flags that are supported in the new compose command. If you run into any problems with Compose V2, you can easily switch back to Compose v1 by either by making changes in Docker Desktop **Experimental** Settings, or by running the command `docker-compose disable-v2`. Let us know your feedback on the new ‘compose’ command by creating an issue in the [Compose-CLI](https://github.com/docker/compose-cli/issues) GitHub repository. ### Upgrades @@ -124,7 +124,7 @@ This page contains release notes for Docker Desktop for Mac 3.x. **Volume Management**: Docker Desktop users can now create and delete volumes using the Docker Dashboard and also see which volumes are being used. For more information, see [Explore volumes](../use-desktop/volumes.md). -**Compose V2 beta**: Docker Desktop now includes the beta version of Compose V2, which supports the `docker compose` command as part of the Docker CLI. While `docker-compose` is still supported and maintained, Compose V2 implementation relies directly on the compose-go bindings which are maintained as part of the specification. The compose command in the Docker CLI supports most of the `docker-compose` commands and flags. It is expected to be a drop-in replacement for `docker-compose`. There are a few remaining flags that have yet to be implemented, see the [docker-compose compatibility list](/manuals/compose/releases/migrate.md) for more information about the flags that are supported in the new compose command. If you run into any problems with Compose V2, you can easily switch back to Compose v1 by either by making changes in Docker Desktop **Experimental** Settings, or by running the command `docker-compose disable-v2`. Let us know your feedback on the new ‘compose’ command by creating an issue in the [Compose-CLI](https://github.com/docker/compose-cli/issues) GitHub repository. +**Compose V2 beta**: Docker Desktop now includes the beta version of Compose V2, which supports the `docker compose` command as part of the Docker CLI. While `docker-compose` is still supported and maintained, Compose V2 implementation relies directly on the compose-go bindings which are maintained as part of the specification. The compose command in the Docker CLI supports most of the `docker-compose` commands and flags. It is expected to be a drop-in replacement for `docker-compose`. There are a few remaining flags that have yet to be implemented, see the docker-compose compatibility list for more information about the flags that are supported in the new compose command. If you run into any problems with Compose V2, you can easily switch back to Compose v1 by either by making changes in Docker Desktop **Experimental** Settings, or by running the command `docker-compose disable-v2`. Let us know your feedback on the new ‘compose’ command by creating an issue in the [Compose-CLI](https://github.com/docker/compose-cli/issues) GitHub repository. **Skip Docker Desktop updates**: All users can now skip an update when they are prompted to install individual Docker Desktop releases. diff --git a/content/manuals/desktop/previous-versions/3.x-windows.md b/content/manuals/desktop/previous-versions/3.x-windows.md index 8cc3a627f86b..910a8afe3d04 100644 --- a/content/manuals/desktop/previous-versions/3.x-windows.md +++ b/content/manuals/desktop/previous-versions/3.x-windows.md @@ -86,7 +86,7 @@ This page contains release notes for Docker Desktop for Windows 3.x. **Dev Environments Preview**: Dev Environments enable you to seamlessly collaborate with your team members without moving between Git branches to get your code onto your team members' machines. When using Dev Environments, you can share your in-progress work with your team members in just one click, and without having to deal with any merge conflicts. -**Compose V2 beta**: Docker Desktop now includes the beta version of Compose V2, which supports the `docker compose` command as part of the Docker CLI. While `docker-compose` is still supported and maintained, Compose V2 implementation relies directly on the compose-go bindings which are maintained as part of the specification. The compose command in the Docker CLI supports most of the `docker-compose` commands and flags. It is expected to be a drop-in replacement for `docker-compose`. There are a few remaining flags that have yet to be implemented, see the [docker-compose compatibility list](/manuals/compose/releases/migrate.md) for more information about the flags that are supported in the new compose command. If you run into any problems with Compose V2, you can easily switch back to Compose v1 by either by making changes in Docker Desktop **Experimental** Settings, or by running the command `docker-compose disable-v2`. Let us know your feedback on the new ‘compose’ command by creating an issue in the [Compose-CLI](https://github.com/docker/compose-cli/issues) GitHub repository. +**Compose V2 beta**: Docker Desktop now includes the beta version of Compose V2, which supports the `docker compose` command as part of the Docker CLI. While `docker-compose` is still supported and maintained, Compose V2 implementation relies directly on the compose-go bindings which are maintained as part of the specification. The compose command in the Docker CLI supports most of the `docker-compose` commands and flags. It is expected to be a drop-in replacement for `docker-compose`. There are a few remaining flags that have yet to be implemented, see the docker-compose compatibility list for more information about the flags that are supported in the new compose command. If you run into any problems with Compose V2, you can easily switch back to Compose v1 by either by making changes in Docker Desktop **Experimental** Settings, or by running the command `docker-compose disable-v2`. Let us know your feedback on the new ‘compose’ command by creating an issue in the [Compose-CLI](https://github.com/docker/compose-cli/issues) GitHub repository. ### Bug fixes and minor changes @@ -100,7 +100,7 @@ This page contains release notes for Docker Desktop for Windows 3.x. **Dev Environments Preview**: Dev Environments enable you to seamlessly collaborate with your team members without moving between Git branches to get your code onto your team members' machines. When using Dev Environments, you can share your in-progress work with your team members in just one click, and without having to deal with any merge conflicts. -**Compose V2 beta**: Docker Desktop now includes the beta version of Compose V2, which supports the `docker compose` command as part of the Docker CLI. While `docker-compose` is still supported and maintained, Compose V2 implementation relies directly on the compose-go bindings which are maintained as part of the specification. The compose command in the Docker CLI supports most of the `docker-compose` commands and flags. It is expected to be a drop-in replacement for `docker-compose`. There are a few remaining flags that have yet to be implemented, see the [docker-compose compatibility list](/manuals/compose/releases/migrate.md) for more information about the flags that are supported in the new compose command. If you run into any problems with Compose V2, you can easily switch back to Compose v1 by either by making changes in Docker Desktop **Experimental** Settings, or by running the command `docker-compose disable-v2`. Let us know your feedback on the new ‘compose’ command by creating an issue in the [Compose-CLI](https://github.com/docker/compose-cli/issues) GitHub repository. +**Compose V2 beta**: Docker Desktop now includes the beta version of Compose V2, which supports the `docker compose` command as part of the Docker CLI. While `docker-compose` is still supported and maintained, Compose V2 implementation relies directly on the compose-go bindings which are maintained as part of the specification. The compose command in the Docker CLI supports most of the `docker-compose` commands and flags. It is expected to be a drop-in replacement for `docker-compose`. There are a few remaining flags that have yet to be implemented, see the docker-compose compatibility list for more information about the flags that are supported in the new compose command. If you run into any problems with Compose V2, you can easily switch back to Compose v1 by either by making changes in Docker Desktop **Experimental** Settings, or by running the command `docker-compose disable-v2`. Let us know your feedback on the new ‘compose’ command by creating an issue in the [Compose-CLI](https://github.com/docker/compose-cli/issues) GitHub repository. ### Upgrades @@ -131,7 +131,7 @@ This page contains release notes for Docker Desktop for Windows 3.x. **Volume Management**: Docker Desktop users can now create and delete volumes using the Docker Dashboard and also see which volumes are being used. For more information, see [Explore volumes](../use-desktop/volumes.md). -**Compose V2 beta**: Docker Desktop now includes the beta version of Compose V2, which supports the `docker compose` command as part of the Docker CLI. While `docker-compose` is still supported and maintained, Compose V2 implementation relies directly on the compose-go bindings which are maintained as part of the specification. The compose command in the Docker CLI supports most of the `docker-compose` commands and flags. It is expected to be a drop-in replacement for `docker-compose`. There are a few remaining flags that have yet to be implemented, see the [docker-compose compatibility list](/manuals/compose/releases/migrate.md) for more information about the flags that are supported in the new compose command. If you run into any problems with Compose V2, you can easily switch back to Compose v1 by either by making changes in Docker Desktop **Experimental** Settings, or by running the command `docker-compose disable-v2`. Let us know your feedback on the new ‘compose’ command by creating an issue in the [Compose-CLI](https://github.com/docker/compose-cli/issues) GitHub repository. +**Compose V2 beta**: Docker Desktop now includes the beta version of Compose V2, which supports the `docker compose` command as part of the Docker CLI. While `docker-compose` is still supported and maintained, Compose V2 implementation relies directly on the compose-go bindings which are maintained as part of the specification. The compose command in the Docker CLI supports most of the `docker-compose` commands and flags. It is expected to be a drop-in replacement for `docker-compose`. There are a few remaining flags that have yet to be implemented, see the docker-compose compatibility list for more information about the flags that are supported in the new compose command. If you run into any problems with Compose V2, you can easily switch back to Compose v1 by either by making changes in Docker Desktop **Experimental** Settings, or by running the command `docker-compose disable-v2`. Let us know your feedback on the new ‘compose’ command by creating an issue in the [Compose-CLI](https://github.com/docker/compose-cli/issues) GitHub repository. **Skip Docker Desktop updates**: All users can now skip an update when they are prompted to install individual Docker Desktop releases. diff --git a/content/manuals/desktop/release-notes.md b/content/manuals/desktop/release-notes.md index 53dad4870d6f..7d90b9a67157 100644 --- a/content/manuals/desktop/release-notes.md +++ b/content/manuals/desktop/release-notes.md @@ -2255,7 +2255,7 @@ This can be resolved by adding the user to the **docker-users** group. Before st ### Removed -- Removed Compose V1 from Docker Desktop as it has stopped receiving updates. Compose V2 has replaced it and is now integrated into all current Docker Desktop versions. For more information, see [Migrate to Compose V2](/manuals/compose/releases/migrate.md). +- Removed Compose V1 from Docker Desktop as it has stopped receiving updates. Compose V2 has replaced it and is now integrated into all current Docker Desktop versions. ### Bug fixes and enhancements @@ -2520,7 +2520,7 @@ This can be resolved by adding the user to the **docker-users** group. Before st - Added more details to dashboard errors when a `docker-compose` action fails ([docker/for-win#13378](https://github.com/docker/for-win/issues/13378)). - Added support for setting HTTP proxy configuration during installation. This can be done via the `--proxy-http-mode`, `--overrider-proxy-http`, `--override-proxy-https` and `--override-proxy-exclude` installer flags in the case of installation from the CLI on [Mac](/manuals/desktop/setup/install/mac-install.md#install-from-the-command-line) and [Windows](/manuals/desktop/setup/install/windows-install.md#install-from-the-command-line), or alternatively by setting the values in the `install-settings.json` file. - Docker Desktop now stops overriding .docker/config.json `credsStore` keys on application start. Note that if you use a custom credential helper then the CLI `docker login` and `docker logout` does not affect whether the UI is signed in to Docker or not. In general, it is better to sign into Docker via the UI since the UI supports multi-factor authentication. -- Added a warning about the [forthcoming removal of Compose V1 from Docker Desktop](/manuals/compose/releases/migrate.md). Can be suppressed with `COMPOSE_V1_EOL_SILENT=1`. +- Added a warning about the forthcoming removal of Compose V1 from Docker Desktop. Can be suppressed with `COMPOSE_V1_EOL_SILENT=1`. - In the Compose config, boolean fields in YAML should be either `true` or `false`. Deprecated YAML 1.1 values such as “on” or “no” now produce a warning. - Improved UI for image table, allowing rows to use more available space. - Fixed various bugs in port-forwarding. From f45935e1c5413e2e246f5db4280f4d9fe8669294 Mon Sep 17 00:00:00 2001 From: aevesdocker Date: Tue, 6 Jan 2026 08:56:52 +0000 Subject: [PATCH 2/3] ENGDOCS-3131 --- content/manuals/compose/releases/migrate.md | 135 -------------------- 1 file changed, 135 deletions(-) delete mode 100644 content/manuals/compose/releases/migrate.md diff --git a/content/manuals/compose/releases/migrate.md b/content/manuals/compose/releases/migrate.md deleted file mode 100644 index 74edd32cef05..000000000000 --- a/content/manuals/compose/releases/migrate.md +++ /dev/null @@ -1,135 +0,0 @@ ---- -linkTitle: Migrate to Compose v2 -Title: Migrate from Docker Compose v1 to v2 -weight: 30 -description: Step-by-step guidance to migrate from Compose v1 to v2, including syntax differences, environment handling, and CLI changes -keywords: migrate docker compose, upgrade docker compose v2, docker compose migration, docker compose v1 vs v2, docker compose CLI changes, docker-compose to docker compose -aliases: -- /compose/compose-v2/ -- /compose/cli-command-compatibility/ -- /compose/migrate/ ---- - -From July 2023, Compose v1 stopped receiving updates. It’s also no longer available in new releases of Docker Desktop. - -Compose v2, which was first released in 2020, is included with all currently supported versions of Docker Desktop. It offers an improved CLI experience, improved build performance with BuildKit, and continued new-feature development. - -## How do I switch to Compose v2? - -The easiest and recommended way is to make sure you have the latest version of [Docker Desktop](/manuals/desktop/release-notes.md), which bundles the Docker Engine and Docker CLI platform including Compose v2. - -With Docker Desktop, Compose v2 is always accessible as `docker compose`. - -For manual installs on Linux, you can get Compose v2 by either: -- [Using Docker's repository](/manuals/compose/install/linux.md#install-using-the-repository) (recommended) -- [Downloading and installing manually](/manuals/compose/install/linux.md#install-the-plugin-manually) - -## What are the differences between Compose v1 and Compose v2? - -### `docker-compose` vs `docker compose` - -Unlike Compose v1, Compose v2 integrates into the Docker CLI platform and the recommended command-line syntax is `docker compose`. - -The Docker CLI platform provides a consistent and predictable set of options and flags, such as the `DOCKER_HOST` environment variable or the `--context` command-line flag. - -This change lets you use all of the shared flags on the root `docker` command. -For example, `docker --log-level=debug --tls compose up` enables debug logging from the Docker Engine as well as ensuring that TLS is used for the connection. - -> [!TIP] -> -> Update scripts to use Compose v2 by replacing the hyphen (`-`) with a space, using `docker compose` instead of `docker-compose`. - -### Service container names - -Compose generates container names based on the project name, service name, and scale/replica count. - -In Compose v1, an underscore (`_`) was used as the word separator. -In Compose v2, a hyphen (`-`) is used as the word separator. - -Underscores aren't valid characters in DNS hostnames. -By using a hyphen instead, Compose v2 ensures service containers can be accessed over the network via consistent, predictable hostnames. - -For example, running the Compose command `-p myproject up --scale=1 svc` results in a container named `myproject_svc_1` with Compose v1 and a container named `myproject-svc-1` with Compose v2. - -> [!TIP] -> -> In Compose v2, the global `--compatibility` flag or `COMPOSE_COMPATIBILITY` environment variable preserves the Compose v1 behavior to use underscores (`_`) as the word separator. -As this option must be specified for every Compose v2 command run, it's recommended that you only use this as a temporary measure while transitioning to Compose v2. - -### Command-line flags and subcommands - -Compose v2 supports almost all Compose V1 flags and subcommands, so in most cases, it can be used as a drop-in replacement in scripts. - -#### Unsupported in v2 - -The following were deprecated in Compose v1 and aren't supported in Compose v2: -* `docker-compose scale`. Use `docker compose up --scale` instead. -* `docker-compose rm --all` - -#### Different in v2 - -The following behave differently between Compose v1 and v2: - -| | Compose v1 | Compose v2 | -|-------------------------|------------------------------------------------------------------|-------------------------------------------------------------------------------| -| `--compatibility` | Deprecated. Migrates YAML fields based on legacy schema version. | Uses `_` as word separator for container names instead of `-` to match v1. | -| `ps --filter KEY-VALUE` | Undocumented. Allows filtering by arbitrary service properties. | Only allows filtering by specific properties, e.g. `--filter=status=running`. | - -### Environment variables - -Environment variable behavior in Compose v1 wasn't formally documented and behaved inconsistently in some edge cases. - -For Compose v2, the [Environment variables](/manuals/compose/how-tos/environment-variables/_index.md) section covers both [precedence](/manuals/compose/how-tos/environment-variables/envvars-precedence.md) as well as [`.env` file interpolation](/manuals/compose/how-tos/environment-variables/variable-interpolation.md) and includes many examples covering tricky situations such as escaping nested quotes. - -Check if: -- Your project uses multiple levels of environment variable overrides, for example `.env` file and `--env` CLI flags. -- Any `.env` file values have escape sequences or nested quotes. -- Any `.env` file values contain literal `$` signs in them. This is common with PHP projects. -- Any variable values use advanced expansion syntax, for example `${VAR:?error}`. - -> [!TIP] -> -> Run `docker compose config` on the project to preview the configuration after Compose v2 has performed interpolation to -verify that values appear as expected. -> -> Maintaining backwards compatibility with Compose v1 is typically achievable by ensuring that literal values (no -interpolation) are single-quoted and values that should have interpolation applied are double-quoted. - -## What does this mean for my projects that use Compose v1? - -For most projects, switching to Compose v2 requires no changes to the Compose YAML or your development workflow. - -It's recommended that you adapt to the new preferred way of running Compose v2, which is to use `docker compose` instead of `docker-compose`. -This provides additional flexibility and removes the requirement for a `docker-compose` compatibility alias. - -However, Docker Desktop continues to support a `docker-compose` alias to redirect commands to `docker compose` for convenience and improved compatibility with third-party tools and scripts. - -## Is there anything else I need to know before I switch? - -### Migrating running projects - -In both v1 and v2, running up on a Compose project recreates service containers as needed. It compares the actual state in the Docker Engine to the resolved project configuration, which includes the Compose YAML, environment variables, and command-line flags. - -Because Compose v1 and v2 [name service containers differently](#service-container-names), running `up` using v2 the first time on a project with running services originally launched by v1, results in service containers being recreated with updated names. - -Note that even if `--compatibility` flag is used to preserve the v1 naming style, Compose still needs to recreate service containers originally launched by v1 the first time `up` is run by v2 to migrate the internal state. - -### Using Compose v2 with Docker-in-Docker - -Compose v2 is now included in the [Docker official image on Docker Hub](https://hub.docker.com/_/docker). - -Additionally, a new [docker/compose-bin image on Docker Hub](https://hub.docker.com/r/docker/compose-bin) packages the latest version of Compose v2 for use in multi-stage builds. - -## Can I still use Compose v1 if I want to? - -Yes. You can still download and install Compose v1 packages, but you won't get support from Docker if anything breaks. - ->[!WARNING] -> -> The final Compose v1 release, version 1.29.2, was May 10, 2021. These packages haven't received any security updates since then. Use at your own risk. - -## Additional Resources - -- [docker-compose v1 on PyPI](https://pypi.org/project/docker-compose/1.29.2/) -- [docker/compose v1 on Docker Hub](https://hub.docker.com/r/docker/compose) -- [docker-compose v1 source on GitHub](https://github.com/docker/compose/releases/tag/1.29.2) From 8aac1af4dd26ec42c3c7bad34ce5815a2bd65429 Mon Sep 17 00:00:00 2001 From: aevesdocker Date: Tue, 6 Jan 2026 09:03:25 +0000 Subject: [PATCH 3/3] fix build --- content/includes/compose-eol.md | 2 +- content/manuals/compose/how-tos/networking.md | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/content/includes/compose-eol.md b/content/includes/compose-eol.md index 711d40880170..ce5ad8fab965 100644 --- a/content/includes/compose-eol.md +++ b/content/includes/compose-eol.md @@ -2,4 +2,4 @@ > > Docker's documentation refers to and describes Compose V2 functionality. > -> Effective July 2023, Compose V1 stopped receiving updates and is no longer in new Docker Desktop releases. Compose V2 has replaced it and is now integrated into all current Docker Desktop versions. For more information, see [Migrate to Compose V2](/compose/migrate). +> Effective July 2023, Compose V1 stopped receiving updates and is no longer in new Docker Desktop releases. Compose V2 has replaced it and is now integrated into all current Docker Desktop versions. diff --git a/content/manuals/compose/how-tos/networking.md b/content/manuals/compose/how-tos/networking.md index 864bb49c23d2..265cc5a11064 100644 --- a/content/manuals/compose/how-tos/networking.md +++ b/content/manuals/compose/how-tos/networking.md @@ -8,8 +8,6 @@ aliases: - /compose/networking/ --- -{{% include "compose-eol.md" %}} - By default Compose sets up a single [network](/reference/cli/docker/network/create.md) for your app. Each container for a service joins the default network and is both reachable by