From dcdd50edbdf2b33f6eef7b77cafe0278777e3fef Mon Sep 17 00:00:00 2001 From: Usha Mandya <47779042+usha-mandya@users.noreply.github.com> Date: Tue, 3 May 2022 12:21:26 +0100 Subject: [PATCH] Apply suggestions from code review Apply suggestions from code review Co-authored-by: Sebastiaan van Stijn --- compose/cli-command-compatibility.md | 7 +++-- compose/index.md | 43 +++++++++++++++------------- compose/install.md | 20 ++++--------- 3 files changed, 32 insertions(+), 38 deletions(-) diff --git a/compose/cli-command-compatibility.md b/compose/cli-command-compatibility.md index bf70743083..a512ba7c72 100644 --- a/compose/cli-command-compatibility.md +++ b/compose/cli-command-compatibility.md @@ -68,8 +68,8 @@ The result above is a full size configuration of what will be used by Docker Com ### Copy -The cp command is intended to copy files or folders between service containers and the local filesystem. -This command is a bidirectional command, we can copy `from` or `to` the service containers. +The `cp` command is intended to copy files or folders between service containers and the local filesystem. +This command is a bidirectional command, we can copy **from** or **to** the service containers. Copy a file from a service container to the local filesystem: @@ -102,8 +102,9 @@ With the GA version of Compose we can run some commands: - or without specifying the project directory with the `--project-directory` flag When a compose project has been loaded once, we can just use the `-p` or `--project-name` to reference it: + ```console $ docker compose -p my-loaded-project restart my-service ``` -This option works with `start`, `stop`, `restart` and `down` \ No newline at end of file +This option works with the `start`, `stop`, `restart` and `down` commands. \ No newline at end of file diff --git a/compose/index.md b/compose/index.md index 9347abfa49..8629119077 100644 --- a/compose/index.md +++ b/compose/index.md @@ -71,23 +71,39 @@ Compose has commands for managing the whole lifecycle of your application: > Important > -> The new Compose V2, which supports the `compose` command as part of the Docker CLI, is now available. +> The new Compose V2, which supports the `compose` command as part of the Docker +> CLI, is now available. > -> Compose V2 integrates compose functions into the Docker platform, continuing to support most of the previous `docker-compose` features and flags. You can run Compose V2 by replacing the hyphen (`-`) with a space, using `docker compose`, instead of `docker-compose`. +> Compose V2 integrates compose functions into the Docker platform, continuing +> to support most of the previous `docker-compose` features and flags. You can +> run Compose V2 by replacing the hyphen (`-`) with a space, using `docker compose`, +> instead of `docker-compose`. {: .important} -If you rely on using Docker Compose as `docker-compose` (with a hyphen), you can set up Compose V2 to act as a drop-in replacement of the previous `docker-compose`. Refer to the [Installing Compose](install.md) section for detailed instructions. +If you rely on using Docker Compose as `docker-compose` (with a hyphen), you can +set up Compose V2 to act as a drop-in replacement of the previous `docker-compose`. +Refer to the [Installing Compose](install.md) section for detailed instructions. ## Context of Docker Compose evolution -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. +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.md) and [Microsoft ACI](../cloud/aci-integration.md). +As the Compose specification evolves, new features land faster in the Docker CLI. -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. +Compose V2 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 specification, +such as [profiles](profiles.md) and [GPU](gpu-support.md) devices. -Compose V2 as been re-written in [Go](https://go.dev), which improves integration +Compose V2 has been re-written in [Go](https://go.dev), which improves integration with other Docker command-line features, and allows it to run natively on [macOS on Apple silicon](../desktop/mac/apple-silicon.md), Windows, and Linux, -without the need of dependencies such as Python. +without dependencies such as Python. For more information about compatibility with the compose v1 command-line, see the [docker-compose compatibility list](cli-command-compatibility.md). @@ -200,19 +216,6 @@ To see a detailed list of changes for past and current releases of Docker Compose, refer to the [CHANGELOG](https://github.com/docker/compose/blob/master/CHANGELOG.md). - -## Compose documentation - -- [Installing Compose](install.md) -- [Getting started with Compose](gettingstarted.md) -- [Get started with Django](../samples/django.md) -- [Get started with Rails](../samples/rails.md) -- [Get started with WordPress](../samples/wordpress.md) -- [Frequently asked questions](faq.md) -- [Command line reference](reference/index.md) -- [Compose file reference](compose-file/index.md) - - ## Getting help Docker Compose is under active development. If you need help, would like to diff --git a/compose/install.md b/compose/install.md index 45789d0c78..aa756ea500 100644 --- a/compose/install.md +++ b/compose/install.md @@ -121,15 +121,11 @@ You can install Docker Compose in different ways, depending on your needs: - In testing and development environments, some users choose to use automated [convenience scripts](#install-using-the-convenience-script) to install Docker. - -- Most users - [set up Docker's repositories](#install-using-the-repository) and install - from them, for ease of installation and upgrade tasks. This is the +- Most users [set up Docker's repositories](#install-using-the-repository) and + install from them, for ease of installation and upgrade tasks. This is the recommended approach. - -- Some users download the binary and - [install it manually](#install-binary-manually) and manage - upgrades completely manually. +- Some users [download and install the binary](#install-binary-manually), + and manage upgrades manually. #### Install using the convenience script @@ -154,12 +150,6 @@ When finished $ sudo apt-get install docker-compose-plugin ``` - > Got multiple Docker repositories? - > - > If you have multiple Docker repositories enabled, installing - > or updating without specifying a version in the `apt-get install` or - > `apt-get update` command always installs the highest possible version, - > which may not be appropriate for your stability needs. 2. To install a _specific version_ of Docker Engine, list the available versions in the repo, then select and install: @@ -187,7 +177,7 @@ When finished ``` -#### Install Binary Manually +#### Install the binary manually On Linux, you can download the Docker Compose binary from the [Compose repository release page on GitHub](https://github.com/docker/compose/releases){:target="_blank" rel="noopener" class="_"} and copying it into `$HOME/.docker/cli-plugins` as `docker-compose`.