You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Transform your Compose configuration file into configuration files for different platforms, such as Kubernetes.
39
+
icon: move_down
40
+
link: /compose/bridge
39
41
- title: Browse common FAQs
40
42
description: Explore general FAQs and find out how to give feedback.
41
43
icon: help
@@ -58,12 +60,12 @@ It is the key to unlocking a streamlined and efficient development and deploymen
58
60
Compose simplifies the control of your entire application stack, making it easy to manage services, networks, and volumes in a single YAML configuration file. Then, with a single command, you create and start all the services
59
61
from your configuration file.
60
62
61
-
Compose works in all environments; production, staging, development, testing, as
63
+
Compose works in all environments - production, staging, development, testing, as
62
64
well as CI workflows. It also has commands for managing the whole lifecycle of your application:
The easiest and recommended way to get Docker Compose is to install Docker Desktop.
24
22
@@ -33,7 +31,7 @@ Docker Desktop is available for:
33
31
>
34
32
> If you have already installed Docker Desktop, you can check which version of Compose you have by selecting **About Docker Desktop** from the Docker menu {{< inline-image src="../../desktop/images/whale-x.svg" alt="whale menu" >}}.
35
33
36
-
### Scenario two: Install the Docker Compose plugin (Linux only)
34
+
### Plugin (Linux only)
37
35
38
36
> [!IMPORTANT]
39
37
>
@@ -43,7 +41,7 @@ If you already have Docker Engine and Docker CLI installed, you can install the
How you uninstall Docker Compose depends on how it was installed. This guide covers uninstallation instructions for:
@@ -13,7 +14,7 @@ How you uninstall Docker Compose depends on how it was installed. This guide cov
13
14
14
15
If you want to uninstall Docker Compose and you have installed Docker Desktop, see [Uninstall Docker Desktop](/manuals/desktop/uninstall.md).
15
16
16
-
> [!NOTE]
17
+
> [!WARNING]
17
18
>
18
19
> Unless you have other Docker instances installed on that specific environment, uninstalling Docker Desktop removes all Docker components, including Docker Engine, Docker CLI, and Docker Compose.
@@ -21,7 +21,7 @@ Services communicate with each other through [networks](/reference/compose-file/
21
21
22
22
Services store and share persistent data into [volumes](/reference/compose-file/volumes.md). The Specification describes such a persistent data as a high-level filesystem mount with global options.
23
23
24
-
Some services require configuration data that is dependent on the runtime or platform. For this, the Specification defines a dedicated [configs](/reference/compose-file/configs.md) concept. From a service container point of view, configs are comparable to volumes, in that they are files mounted into the container. But the actual definition involves distinct platform resources and services, which are abstracted by this type.
24
+
Some services require configuration data that is dependent on the runtime or platform. For this, the Specification defines a dedicated [configs](/reference/compose-file/configs.md) concept. From inside the container, configs behave like volumes—they’re mounted as files. However, configs are defined differently at the platform level.
25
25
26
26
A [secret](/reference/compose-file/secrets.md) is a specific flavor of configuration data for sensitive data that should not be exposed without security considerations. Secrets are made available to services as files mounted into their containers, but the platform-specific resources to provide sensitive data are specific enough to deserve a distinct concept and definition within the Compose Specification.
27
27
@@ -55,7 +55,9 @@ If you want to reuse other Compose files, or factor out parts of your applicatio
55
55
56
56
## CLI
57
57
58
-
The Docker CLI lets you interact with your Docker Compose applications through the `docker compose` command, and its subcommands. Using the CLI, you can manage the lifecycle of your multi-container applications defined in the `compose.yaml` file. The CLI commands enable you to start, stop, and configure your applications effortlessly.
58
+
The Docker CLI lets you interact with your Docker Compose applications through the `docker compose` command and its subcommands. If you're using Docker Desktop, the Docker Compose CLI is included by default.
59
+
60
+
Using the CLI, you can manage the lifecycle of your multi-container applications defined in the `compose.yaml` file. The CLI commands enable you to start, stop, and configure your applications effortlessly.
59
61
60
62
### Key commands
61
63
@@ -101,11 +103,11 @@ Both services communicate with each other on an isolated back-tier network, whil
101
103
102
104
The example application is composed of the following parts:
103
105
104
-
-2 services, backed by Docker images: `webapp` and `database`
105
-
-1 secret (HTTPS certificate), injected into the frontend
106
-
-1 configuration (HTTP), injected into the frontend
107
-
-1 persistent volume, attached to the backend
108
-
-2 networks
106
+
-Two services, backed by Docker images: `webapp` and `database`
107
+
-One secret (HTTPS certificate), injected into the frontend
108
+
-One configuration (HTTP), injected into the frontend
description: Discover the benefits and typical use cases of Docker Compose for containerized application development and deployment
3
+
keywords: docker compose, compose use cases, compose benefits, container orchestration, development environments, testing containers, yaml file
4
4
title: Why use Compose?
5
5
weight: 20
6
6
aliases:
@@ -11,16 +11,14 @@ aliases:
11
11
12
12
Using Docker Compose offers several benefits that streamline the development, deployment, and management of containerized applications:
13
13
14
-
- Simplified control: Docker Compose allows you to define and manage multi-container applications in a single YAML file. This simplifies the complex task of orchestrating and coordinating various services, making it easier to manage and replicate your application environment.
14
+
- Simplified control: Define and manage multi-container apps in one YAML file, streamlining orchestration and replication.
15
15
16
-
- Efficient collaboration: Docker Compose configuration files are easy to share, facilitating collaboration among developers, operations teams, and other stakeholders. This collaborative approach leads to smoother workflows, faster issue resolution, and increased overall efficiency.
16
+
- Efficient collaboration: Shareable YAML files support smooth collaboration between developers and operations, improving workflows and issue resolution, leading to increased overall efficiency.
17
17
18
18
- Rapid application development: Compose caches the configuration used to create a container. When you restart a service that has not changed, Compose re-uses the existing containers. Re-using containers means that you can make changes to your environment very quickly.
19
19
20
20
- Portability across environments: Compose supports variables in the Compose file. You can use these variables to customize your composition for different environments, or different users.
21
21
22
-
- Extensive community and support: Docker Compose benefits from a vibrant and active community, which means abundant resources, tutorials, and support. This community-driven ecosystem contributes to the continuous improvement of Docker Compose and helps users troubleshoot issues effectively.
23
-
24
22
## Common use cases of Docker Compose
25
23
26
24
Compose can be used in many different ways. Some common use cases are outlined
@@ -67,4 +65,4 @@ For details on using production-oriented features, see
67
65
68
66
-[Learn about the history of Compose](history.md)
69
67
-[Understand how Compose works](compose-application-model.md)
- A brief history of the development of the Docker Compose CLI
13
13
- A clear explanation of the major versions and file formats that make up Compose v1 and Compose v2
14
-
- The main differences between Compose V1 and Compose v2
14
+
- The main differences between Compose v1 and Compose v2
15
15
16
16
## Introduction
17
17
@@ -24,7 +24,7 @@ It also provides a quick snapshot of the differences in file formats, command-li
24
24
### Docker Compose CLI versioning
25
25
26
26
Version one of the Docker Compose command-line binary was first released in 2014. It was written in Python, and is invoked with `docker-compose`.
27
-
Typically, Compose V1 projects include a top-level `version` element in the `compose.yaml` file, with values ranging from `2.0` to `3.8`, which refer to the specific [file formats](#compose-file-format-versioning).
27
+
Typically, Compose v1 projects include a top-level `version` element in the `compose.yaml` file, with values ranging from `2.0` to `3.8`, which refer to the specific [file formats](#compose-file-format-versioning).
28
28
29
29
Version two of the Docker Compose command-line binary was announced in 2020, is written in Go, and is invoked with `docker compose`.
30
30
Compose v2 ignores the `version` top-level element in the `compose.yaml` file.
@@ -33,7 +33,7 @@ Compose v2 ignores the `version` top-level element in the `compose.yaml` file.
33
33
34
34
The Docker Compose CLIs are defined by specific file formats.
35
35
36
-
Three major versions of the Compose file format for Compose V1 were released:
36
+
Three major versions of the Compose file format for Compose v1 were released:
37
37
- Compose file format 1 with Compose 1.0.0 in 2014
38
38
- Compose file format 2.x with Compose 1.6.0 in 2016
39
39
- Compose file format 3.x with Compose 1.10.0 in 2017
@@ -48,3 +48,9 @@ To address confusion around Compose CLI versioning, Compose file format versioni
48
48
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).
49
49
50
50
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.
0 commit comments