-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compose command doc #12433
Merged
Merged
Compose command doc #12433
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c773cb8
Compose in Docker CLI overview
gtardif 7bacff3
Add compatibility list page for compose command
gtardif 9e5cd1b
Apply suggestions from Usha
gtardif 2d73f6c
Apply suggestions from Usha
gtardif 937e7cd
Latest update on compatibility list
gtardif a5b1f25
Add install instructions
gtardif 44815e8
Suggestions by Marina
gtardif ffc980b
Subsection for compose CLI Tech Preview
gtardif File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
description: Compose command compatibility with docker-compose | ||
keywords: documentation, docs, docker, compose, containers | ||
title: Compose command compatibility with docker-compose | ||
--- | ||
|
||
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, and we are prioritizing these implementations based on usage metrics and user feedback. | ||
|
||
gtardif marked this conversation as resolved.
Show resolved
Hide resolved
|
||
You can follow progress on the implementation of the remaining commands and flags in the [Compose-CLI](https://github.com/docker/compose-cli/issues/1283){:target="_blank" rel="noopener" class="_"} GitHub repository. | ||
|
||
If you see some Compose functionality that is not available in the `compose` command, create an issue in the [Compose-CLI](https://github.com/docker/compose-cli/issues){:target="_blank" rel="noopener" class="_"} GitHub repository so we can prioritize it. | ||
|
||
gtardif marked this conversation as resolved.
Show resolved
Hide resolved
|
||
## Commands or flags not yet implemented | ||
|
||
The following commands have not been implemented yet, and maybe implemented at a later time. | ||
Let us know if these commands are a higher priority for your usecases. | ||
|
||
* `compose build --memory` | ||
* `compose build --no-cache` | ||
* `compose config --no-interpolate` | ||
* `compose config --services` | ||
* `compose config --volumes` | ||
* `compose config --hash` | ||
* `compose images` | ||
* `compose port` | ||
* `compose pull --ignore-pull-failures` | ||
* `compose push --ignore-push-failures` | ||
|
||
## Flags that will not be implemented | ||
|
||
The list below includes the flags that we are not planning to support in Compose in the Docker CLI, | ||
either because they are already deprecated in `docker-compose`, or because they are not relevant for Compose in the Docker CLI. | ||
|
||
* `compose build --compress` Not relevant as the 'compose' command uses buildkit by default. | ||
* `compose build --force-rm` Not relevant as commpose command is using buildkit by default. | ||
* `compose build --no-rm` Not relevant as commpose command is using buildkit by default. | ||
* `compose build --parallel` Not relevant as commpose command is using buildkit by default. | ||
* `compose ps --filter KEY-VALUE` Not relevant due to its complicated usage with the `service` command and also because it is not documented properly in `docker-compose`. | ||
* `compose pull --parallel` Deprecated in docker-compose | ||
* `compose pull --no-parallel` Deprecated in docker-compose | ||
* `compose rm --all` Deprecated in docker-compose. | ||
* `compose scale` Deprecated in docker-compose (use `compose up --scale` instead) | ||
|
||
Global flags: | ||
|
||
* `compose --no-ansi` Deprecated in docker-compose. | ||
* `compose --compatibility` Deprecated in docker-compose. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
description: Compose CLI Tech Preview | ||
keywords: documentation, docs, docker, compose, containers | ||
title: Compose CLI Tech Preview | ||
--- | ||
|
||
gtardif marked this conversation as resolved.
Show resolved
Hide resolved
|
||
## 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. | ||
> | ||
> 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} | ||
|
||
The Docker CLI now supports the `compose` command, including most of the `docker-compose` features and flags, without the need for a separate tool. | ||
|
||
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, can still use `docker-compose` if needed. | ||
|
||
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. | ||
|
||
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). | ||
|
||
## Installing the Compose CLI Tech Preview | ||
|
||
### Install Compose CLI Tech Preview on Mac and Windows | ||
|
||
**Docker Desktop for Mac and for Windows** version 3.1.0 and above includes the new Compose command along | ||
with Docker cli, so Windows and Mac users do not need to install it separately. | ||
For installation instructions, see [Install Docker Desktop on Mac](../docker-for-mac/install.md) and [Install Docker Desktop on Windows](../docker-for-windows/install.md). | ||
|
||
### Install Compose CLI Tech Preview on Linux | ||
|
||
You can install the new Compose CLI including this Tech Preview using the install script: | ||
|
||
```console | ||
curl -L https://raw.githubusercontent.com/docker/compose-cli/main/scripts/install/install_linux.sh | sh | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This page appears as an orphan page - https://deploy-preview-12433--docsdocker.netlify.app/compose/cli-command-compatibility/. It must be linked from the toc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought linking it from the compose tech preview page was OK. Is it mandatory to make it appear in the TOC. (fine for me if we prefer to link everything in TOC)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we should ideally link it from the toc. If users land on this page, there's no context if they want to go back to a previous page, or select a different topic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
Compose Tech preview compatibility
section just next toCompose CLI Tech Preview
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we make 'Compatibility' as a subsection of 'Compose CLI'? I am concerned that having two separate Tech Preview sections in TOC may make it seem like there are two separate Tech Previews...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, agree. We can add that as a subsection.