mirror of https://github.com/docker/docs.git
Add docs for Compose V2 beta
Signed-off-by: Usha Mandya <usha.mandya@docker.com>
This commit is contained in:
parent
6a87313dbb
commit
7c9ec0d344
|
@ -1277,12 +1277,12 @@ manuals:
|
|||
section:
|
||||
- path: /compose/
|
||||
title: Overview of Docker Compose
|
||||
- sectiontitle: Compose CLI Tech Preview
|
||||
- sectiontitle: Compose V2
|
||||
section:
|
||||
- path: /compose/cli-command/
|
||||
title: Overview
|
||||
- path: /compose/cli-command-compatibility/
|
||||
title: Compose CLI compatibility
|
||||
title: Compose v2 compatibility
|
||||
- path: /compose/install/
|
||||
title: Install Compose
|
||||
- path: /compose/gettingstarted/
|
||||
|
|
|
@ -1,42 +1,67 @@
|
|||
---
|
||||
description: Compose CLI Tech Preview
|
||||
keywords: documentation, docs, docker, compose, containers
|
||||
title: Compose CLI Tech Preview
|
||||
description: Compose V2 in the Docker CLI
|
||||
keywords: compose, V2, beta, Tech preview
|
||||
title: Compose V2 beta
|
||||
---
|
||||
|
||||
## New docker compose command
|
||||
## Compose V2 and the new `docker compose` command
|
||||
|
||||
> Important
|
||||
>
|
||||
> The `compose` command in the Docker CLI is currently available as a Tech Preview. We recommend that you do not use this in production environments.
|
||||
> The new Compose V2, which supports the compose command as part of the Docker CLI, is now available as a beta version. Compose V2 seamlessly integrates compose functions into the Docker platform, continuing to support most of the previous `docker-compose` features and flags. You can test the Compose V2 today, by simply replacing the dash (`-`) with a space, and running `docker compose`, instead of `docker-compose`.
|
||||
>
|
||||
> Your feedback is important to us. 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){:target="_blank" rel="noopener" class="_"} GitHub repository.
|
||||
> As Docker Compose V2 is in beta, we recommend that you extensively test before using it in production environments.
|
||||
{: .important}
|
||||
|
||||
The Docker CLI now supports the `compose` command, including most of the `docker-compose` features and flags, without the need for a separate tool.
|
||||
Starting with Docker Desktop 3.4.0, you can run Compose V2 commands without modifying your invocations, by enabling the drop-in replacement of the previous `docker-compose` with the new command. See the section [Installing Compose v2](#installing-compose-v2) for detailed instructions how to enable the drop-in replacement.
|
||||
|
||||
You can replace the dash (`-`) with a space when you use `docker-compose` to switch over to `docker compose`. You can also use them interchangeably, so that you are not locked-in with the new `compose` command and, if needed, you can still use `docker-compose`.
|
||||
We will gradually turn this option on automatically for Docker Desktop users, so that users can seamlessly move to Docker Compose V2 without the need to upgrade any of their scripts. 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`.
|
||||
|
||||
Introduction of the [Compose specification](https://github.com/compose-spec/compose-spec){:target="_blank" rel="noopener" class="_"} makes a clean distinction between the Compose YAML file model and the `docker-compose` implementation. Making this change has enabled a number of enhancements, including the launch of [Amazon ECS](/cloud/ecs-integration) and [Microsoft ACI](/cloud/aci-integration), being able to “up” a Compose application on cloud platforms simply by switching Docker context, and adding compose command directly into the Docker CLI.
|
||||
As the Compose specification evolves, new features land faster in the Docker CLI. While `docker-compose` is still supported and maintained, Compose in the Docker CLI Go implementation relies directly on the compose-go bindings which are maintained as part of the specification. This allows us to include community proposals, experimental implementations by the Docker CLI and/or Engine, and deliver features faster to users. Compose in the Docker CLI already supports some of the newer additions to the Compose specification such as profiles and GPU devices.
|
||||
Your feedback is important to us. 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){:target="_blank" rel="noopener" class="_"} GitHub repository.
|
||||
{: .important}
|
||||
|
||||
For more information about the flags that are not yet supported in the new `compose` command, see the [docker-compose compatibility list](cli-command-compatibility.md).
|
||||
## Context of Docker Compose evolution
|
||||
|
||||
## Installing the Compose CLI Tech Preview
|
||||
Introduction of the [Compose specification](https://github.com/compose-spec/compose-spec){:target="_blank" rel="noopener" class="_"} makes a clean distinction between the Compose YAML file model and the `docker-compose` implementation. Making this change has enabled a number of enhancements, including adding the `compose` command directly into the Docker CLI, being able to “up” a Compose application on cloud platforms by simply switching the Docker context, and launching of [Amazon ECS](/cloud/ecs-integration) and [Microsoft ACI](/cloud/aci-integration). As the Compose specification evolves, new features land faster in the Docker CLI.
|
||||
|
||||
### Install Compose CLI Tech Preview on Mac and Windows
|
||||
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. This allows us to include community proposals, experimental implementations by the Docker CLI and/or Engine, and deliver features faster to users. Compose V2 also supports some of the newer additions to the Compose specification, such as [profiles](profiles.md) and [GPU](gpu-support.md) devices.
|
||||
|
||||
**Docker Desktop for Mac and for Windows** version 3.2.1 and above includes the new Compose command along with the Docker CLI. Therefore, Windows and Mac users do not need to install the Compose CLI Tech Preview separately.
|
||||
Additionally, Compose V2 also supports [Apple silicon](../docker-for-mac/apple-silicon.md).
|
||||
|
||||
For more information about the flags that are supported in the new compose command, see the [docker-compose compatibility list](cli-command-compatibility.md).
|
||||
|
||||
## Installing Compose V2
|
||||
|
||||
This section contains instructions on how to install Compose V2.
|
||||
|
||||
### Install on Mac and Windows
|
||||
|
||||
**Docker Desktop for Mac and for Windows version 3.2.1** and above includes the new Compose command along with the Docker CLI. Therefore, Windows and Mac users do not need to install the Compose V2 separately.
|
||||
|
||||
**Docker Desktop for Mac and for Windows version 3.4.0** and above also includes `docker-compose` drop-in replacement, allowing users to choose to use Compose V2 when using the `docker-compose` command.
|
||||
|
||||
We will progressively turn Docker Compose V2 on automatically for Docker Desktop users, so that users can seamlessly move to Docker Compose V2 without the need to change any of their scripts. If you run into any problems with Compose V2, you can simply switch back to Compose v1, either in Docker Desktop, or in the CLI.
|
||||
|
||||
For Docker Desktop installation instructions, see:
|
||||
|
||||
- [Install Docker Desktop on Mac](../docker-for-mac/install.md)
|
||||
- [Install Docker Desktop on Windows](../docker-for-windows/install.md).
|
||||
- [Install Docker Desktop on Windows](../docker-for-windows/install.md)
|
||||
|
||||
### Install Compose CLI Tech Preview on Linux
|
||||
To disable Docker Compose V2 using Docker Desktop:
|
||||
|
||||
You can install the new Compose CLI, including this Tech Preview, using the following install script:
|
||||
1. From the Docker menu, click **Preferences** (**Settings** on Windows) > **Experimental features**.
|
||||
2. Clear the **Use Docker Compose V2** check box.
|
||||
|
||||
To disable Docker Compose V2 using the CLI, run:
|
||||
|
||||
```console
|
||||
$ docker-compose disable-v2
|
||||
```
|
||||
|
||||
### Install on Linux
|
||||
|
||||
You can install the new Compose CLI, including Compose V2, using the following install script:
|
||||
|
||||
```console
|
||||
$ curl -L https://raw.githubusercontent.com/docker/compose-cli/main/scripts/install/install_linux.sh | sh
|
||||
```
|
||||
```
|
Loading…
Reference in New Issue