mirror of https://github.com/docker/docs.git
parent
71c4fe8873
commit
9d975a92a6
|
@ -52,7 +52,7 @@ You can use Docker (surprise) to build and serve the files locally.
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> This requires Docker Desktop version **4.24** or later, or Docker Engine with Docker
|
> This requires Docker Desktop version **4.24** or later, or Docker Engine with Docker
|
||||||
> Compose version [**2.22**](https://docs.docker.com/compose/file-watch/) or later.
|
> Compose version [**2.22**](https://docs.docker.com/compose/how-tos/file-watch/) or later.
|
||||||
|
|
||||||
1. [Fork the docker/docs repository.](https://github.com/docker/docs/fork)
|
1. [Fork the docker/docs repository.](https://github.com/docker/docs/fork)
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ grid:
|
||||||
- text: "Try Docker Compose"
|
- text: "Try Docker Compose"
|
||||||
url: "/compose/gettingstarted/"
|
url: "/compose/gettingstarted/"
|
||||||
- text: "Release notes"
|
- text: "Release notes"
|
||||||
url: "/compose/release-notes/"
|
url: "/compose/releases/release-notes/"
|
||||||
- title: Docker Hub
|
- title: Docker Hub
|
||||||
icon: device_hub
|
icon: device_hub
|
||||||
description: |
|
description: |
|
||||||
|
|
|
@ -198,7 +198,7 @@ This command runs a Postgres container, sets an environment variable for passwor
|
||||||
|
|
||||||
## Additional resources
|
## Additional resources
|
||||||
|
|
||||||
* [Ways to set environment variables with Compose](/compose/environment-variables/set-environment-variables/)
|
* [Ways to set environment variables with Compose](/compose/how-tos/environment-variables/set-environment-variables/)
|
||||||
* [What is a container](/get-started/docker-concepts/the-basics/what-is-a-container/)
|
* [What is a container](/get-started/docker-concepts/the-basics/what-is-a-container/)
|
||||||
|
|
||||||
## Next steps
|
## Next steps
|
||||||
|
|
|
@ -136,4 +136,4 @@ This page was a brief introduction to Compose. In the following resources, you c
|
||||||
|
|
||||||
* [Overview of Docker Compose](/compose/)
|
* [Overview of Docker Compose](/compose/)
|
||||||
* [Overview of Docker Compose CLI](/compose/reference/)
|
* [Overview of Docker Compose CLI](/compose/reference/)
|
||||||
* [How Compose works](/compose/compose-application-model/)
|
* [How Compose works](/compose/intro/compose-application-model/)
|
||||||
|
|
|
@ -30,7 +30,7 @@ $ git clone https://github.com/Pradumnasaraf/c-plus-plus-docker.git
|
||||||
|
|
||||||
Use Compose Watch to automatically update your running Compose services as you
|
Use Compose Watch to automatically update your running Compose services as you
|
||||||
edit and save your code. For more details about Compose Watch, see [Use Compose
|
edit and save your code. For more details about Compose Watch, see [Use Compose
|
||||||
Watch](/manuals/compose/file-watch.md).
|
Watch](/manuals/compose/how-tos/file-watch.md).
|
||||||
|
|
||||||
Open your `compose.yml` file in an IDE or text editor and then add the Compose Watch instructions. The following example shows how to add Compose Watch to your `compose.yml` file.
|
Open your `compose.yml` file in an IDE or text editor and then add the Compose Watch instructions. The following example shows how to add Compose Watch to your `compose.yml` file.
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ In this section, you also learned how to use Compose Watch to automatically rebu
|
||||||
|
|
||||||
Related information:
|
Related information:
|
||||||
- [Compose file reference](/reference/compose-file/)
|
- [Compose file reference](/reference/compose-file/)
|
||||||
- [Compose file watch](/manuals/compose/file-watch.md)
|
- [Compose file watch](/manuals/compose/how-tos/file-watch.md)
|
||||||
- [Multi-stage builds](/manuals/build/building/multi-stage.md)
|
- [Multi-stage builds](/manuals/build/building/multi-stage.md)
|
||||||
|
|
||||||
## Next steps
|
## Next steps
|
||||||
|
|
|
@ -229,7 +229,7 @@ Press `ctrl+c` in the terminal to stop your application.
|
||||||
|
|
||||||
## Automatically update services
|
## Automatically update services
|
||||||
|
|
||||||
Use Compose Watch to automatically update your running Compose services as you edit and save your code. For more details about Compose Watch, see [Use Compose Watch](/manuals/compose/file-watch.md).
|
Use Compose Watch to automatically update your running Compose services as you edit and save your code. For more details about Compose Watch, see [Use Compose Watch](/manuals/compose/how-tos/file-watch.md).
|
||||||
|
|
||||||
Open your `compose.yaml` file in an IDE or text editor and then add the Compose Watch instructions. The following is the updated `compose.yaml` file.
|
Open your `compose.yaml` file in an IDE or text editor and then add the Compose Watch instructions. The following is the updated `compose.yaml` file.
|
||||||
|
|
||||||
|
@ -387,7 +387,7 @@ database and persist data. You also learned how to use Compose Watch to automati
|
||||||
|
|
||||||
Related information:
|
Related information:
|
||||||
- [Compose file reference](/reference/compose-file/)
|
- [Compose file reference](/reference/compose-file/)
|
||||||
- [Compose file watch](/manuals/compose/file-watch.md)
|
- [Compose file watch](/manuals/compose/how-tos/file-watch.md)
|
||||||
- [Multi-stage builds](/manuals/build/building/multi-stage.md)
|
- [Multi-stage builds](/manuals/build/building/multi-stage.md)
|
||||||
|
|
||||||
## Next steps
|
## Next steps
|
||||||
|
|
|
@ -265,7 +265,7 @@ Press `ctrl+c` in the terminal to stop your application.
|
||||||
|
|
||||||
Use Compose Watch to automatically update your running Compose services as you
|
Use Compose Watch to automatically update your running Compose services as you
|
||||||
edit and save your code. For more details about Compose Watch, see
|
edit and save your code. For more details about Compose Watch, see
|
||||||
[Use Compose Watch](/manuals/compose/file-watch.md).
|
[Use Compose Watch](/manuals/compose/how-tos/file-watch.md).
|
||||||
|
|
||||||
Open your `docker-compose.yaml` file in an IDE or text editor and then add the
|
Open your `docker-compose.yaml` file in an IDE or text editor and then add the
|
||||||
Compose Watch instructions. The following is the updated `docker-compose.yaml`
|
Compose Watch instructions. The following is the updated `docker-compose.yaml`
|
||||||
|
@ -340,7 +340,7 @@ In this section, you took a look at running a database locally and persisting th
|
||||||
Related information:
|
Related information:
|
||||||
|
|
||||||
- [Compose file reference](/reference/compose-file/)
|
- [Compose file reference](/reference/compose-file/)
|
||||||
- [Compose Watch](/manuals/compose/file-watch.md)
|
- [Compose Watch](/manuals/compose/how-tos/file-watch.md)
|
||||||
- [Dockerfile reference](/reference/dockerfile/)
|
- [Dockerfile reference](/reference/dockerfile/)
|
||||||
|
|
||||||
## Next steps
|
## Next steps
|
||||||
|
|
|
@ -240,7 +240,7 @@ Press `ctrl+c` in the terminal to stop your application.
|
||||||
|
|
||||||
## Automatically update services
|
## Automatically update services
|
||||||
|
|
||||||
Use Compose Watch to automatically update your running Compose services as you edit and save your code. For more details about Compose Watch, see [Use Compose Watch](/manuals/compose/file-watch.md).
|
Use Compose Watch to automatically update your running Compose services as you edit and save your code. For more details about Compose Watch, see [Use Compose Watch](/manuals/compose/how-tos/file-watch.md).
|
||||||
|
|
||||||
Open your `compose.yaml` file in an IDE or text editor and then add the Compose Watch instructions. The following is the updated `compose.yaml` file.
|
Open your `compose.yaml` file in an IDE or text editor and then add the Compose Watch instructions. The following is the updated `compose.yaml` file.
|
||||||
|
|
||||||
|
@ -422,7 +422,7 @@ database and persist data. You also learned how to use Compose Watch to automati
|
||||||
|
|
||||||
Related information:
|
Related information:
|
||||||
- [Compose file reference](/reference/compose-file/)
|
- [Compose file reference](/reference/compose-file/)
|
||||||
- [Compose file watch](/manuals/compose/file-watch.md)
|
- [Compose file watch](/manuals/compose/how-tos/file-watch.md)
|
||||||
- [Dockerfile reference](/reference/dockerfile.md)
|
- [Dockerfile reference](/reference/dockerfile.md)
|
||||||
- [Official Docker Image for PHP](https://hub.docker.com/_/php)
|
- [Official Docker Image for PHP](https://hub.docker.com/_/php)
|
||||||
|
|
||||||
|
|
|
@ -473,7 +473,7 @@ Press `ctrl+c` in the terminal to stop your application.
|
||||||
|
|
||||||
Use Compose Watch to automatically update your running Compose services as you
|
Use Compose Watch to automatically update your running Compose services as you
|
||||||
edit and save your code. For more details about Compose Watch, see [Use Compose
|
edit and save your code. For more details about Compose Watch, see [Use Compose
|
||||||
Watch](/manuals/compose/file-watch.md).
|
Watch](/manuals/compose/how-tos/file-watch.md).
|
||||||
|
|
||||||
Open your `compose.yaml` file in an IDE or text editor and then add the Compose
|
Open your `compose.yaml` file in an IDE or text editor and then add the Compose
|
||||||
Watch instructions. The following is the updated `compose.yaml` file.
|
Watch instructions. The following is the updated `compose.yaml` file.
|
||||||
|
@ -562,7 +562,7 @@ database and persist data. You also learned how to use Compose Watch to automati
|
||||||
|
|
||||||
Related information:
|
Related information:
|
||||||
- [Compose file reference](/reference/compose-file/)
|
- [Compose file reference](/reference/compose-file/)
|
||||||
- [Compose file watch](/manuals/compose/file-watch.md)
|
- [Compose file watch](/manuals/compose/how-tos/file-watch.md)
|
||||||
- [Multi-stage builds](/manuals/build/building/multi-stage.md)
|
- [Multi-stage builds](/manuals/build/building/multi-stage.md)
|
||||||
|
|
||||||
## Next steps
|
## Next steps
|
||||||
|
|
|
@ -147,7 +147,7 @@ Press `ctrl+c` in the terminal to stop your application.
|
||||||
|
|
||||||
Use Compose Watch to automatically update your running Compose services as you
|
Use Compose Watch to automatically update your running Compose services as you
|
||||||
edit and save your code. For more details about Compose Watch, see [Use Compose
|
edit and save your code. For more details about Compose Watch, see [Use Compose
|
||||||
Watch](/manuals/compose/file-watch.md).
|
Watch](/manuals/compose/how-tos/file-watch.md).
|
||||||
|
|
||||||
Lines 15 to 18 in the `compose.yaml` file contain properties that trigger Docker
|
Lines 15 to 18 in the `compose.yaml` file contain properties that trigger Docker
|
||||||
to rebuild the image when a file in the current working directory is changed:
|
to rebuild the image when a file in the current working directory is changed:
|
||||||
|
@ -213,7 +213,7 @@ database and persist data. You also learned how to use Compose Watch to automati
|
||||||
|
|
||||||
Related information:
|
Related information:
|
||||||
- [Compose file reference](/reference/compose-file/)
|
- [Compose file reference](/reference/compose-file/)
|
||||||
- [Compose file watch](/manuals/compose/file-watch.md)
|
- [Compose file watch](/manuals/compose/how-tos/file-watch.md)
|
||||||
- [Multi-stage builds](/manuals/build/building/multi-stage.md)
|
- [Multi-stage builds](/manuals/build/building/multi-stage.md)
|
||||||
|
|
||||||
## Next steps
|
## Next steps
|
||||||
|
|
|
@ -129,7 +129,7 @@ Press `ctrl+c` in the terminal to stop your application and run `docker compose
|
||||||
|
|
||||||
Use Compose Watch to automatically update your running Compose services as you
|
Use Compose Watch to automatically update your running Compose services as you
|
||||||
edit and save your code. For more details about Compose Watch, see [Use Compose
|
edit and save your code. For more details about Compose Watch, see [Use Compose
|
||||||
Watch](/manuals/compose/file-watch.md).
|
Watch](/manuals/compose/how-tos/file-watch.md).
|
||||||
|
|
||||||
Open your `compose.yaml` file in an IDE or text editor and then add the Compose
|
Open your `compose.yaml` file in an IDE or text editor and then add the Compose
|
||||||
Watch instructions. The following is the updated `compose.yaml` file.
|
Watch instructions. The following is the updated `compose.yaml` file.
|
||||||
|
@ -193,7 +193,7 @@ database and persist data. You also learned how to use Compose Watch to automati
|
||||||
|
|
||||||
Related information:
|
Related information:
|
||||||
- [Compose file reference](/reference/compose-file/)
|
- [Compose file reference](/reference/compose-file/)
|
||||||
- [Compose file watch](/manuals/compose/file-watch.md)
|
- [Compose file watch](/manuals/compose/how-tos/file-watch.md)
|
||||||
- [Multi-stage builds](/manuals/build/building/multi-stage.md)
|
- [Multi-stage builds](/manuals/build/building/multi-stage.md)
|
||||||
|
|
||||||
## Next steps
|
## Next steps
|
||||||
|
|
|
@ -281,7 +281,7 @@ secrets:
|
||||||
file: db/password.txt
|
file: db/password.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that the file doesn't specify a network for those 2 services. When you use Compose, it automatically creates a network and connects the services to it. For more information see [Networking in Compose](/manuals/compose/networking.md).
|
Note that the file doesn't specify a network for those 2 services. When you use Compose, it automatically creates a network and connects the services to it. For more information see [Networking in Compose](/manuals/compose/how-tos/networking.md).
|
||||||
|
|
||||||
Before you run the application using Compose, notice that this Compose file specifies a `password.txt` file to hold the database's password. You must create this file as it's not included in the source repository.
|
Before you run the application using Compose, notice that this Compose file specifies a `password.txt` file to hold the database's password. You must create this file as it's not included in the source repository.
|
||||||
|
|
||||||
|
|
|
@ -148,7 +148,7 @@ To run Ollama in a container and provide GPU access:
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
>
|
>
|
||||||
> For more details about the Compose instructions, see [Turn on GPU access with Docker Compose](/manuals/compose/gpu-support.md).
|
> For more details about the Compose instructions, see [Turn on GPU access with Docker Compose](/manuals/compose/how-tos/gpu-support.md).
|
||||||
|
|
||||||
3. Add the ollama-pull service to your `compose.yaml` file. This service uses
|
3. Add the ollama-pull service to your `compose.yaml` file. This service uses
|
||||||
the `docker/genai:ollama-pull` image, based on the GenAI Stack's
|
the `docker/genai:ollama-pull` image, based on the GenAI Stack's
|
||||||
|
|
|
@ -96,7 +96,7 @@ To run Ollama in a container and provide GPU access:
|
||||||
```
|
```
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> For more details about the Compose instructions, see [Turn on GPU access with Docker Compose](/manuals/compose/gpu-support.md).
|
> For more details about the Compose instructions, see [Turn on GPU access with Docker Compose](/manuals/compose/how-tos/gpu-support.md).
|
||||||
|
|
||||||
3. Once the Ollama container is up and running it is possible to use the `download_model.sh` inside the `tools` folder with this command:
|
3. Once the Ollama container is up and running it is possible to use the `download_model.sh` inside the `tools` folder with this command:
|
||||||
|
|
||||||
|
|
|
@ -431,7 +431,7 @@ Docker Compose is a tool for defining and running multi-container Docker
|
||||||
applications. With Compose, you use a YAML file to configure your application's
|
applications. With Compose, you use a YAML file to configure your application's
|
||||||
services, networks, and volumes. In this case, the application isn't a
|
services, networks, and volumes. In this case, the application isn't a
|
||||||
multi-container application, but Docker Compose has other useful features for
|
multi-container application, but Docker Compose has other useful features for
|
||||||
development, like [Compose Watch](/manuals/compose/file-watch.md).
|
development, like [Compose Watch](/manuals/compose/how-tos/file-watch.md).
|
||||||
|
|
||||||
The sample application doesn't have a Compose file yet. To create a Compose
|
The sample application doesn't have a Compose file yet. To create a Compose
|
||||||
file, in the `TensorJS-Face-Detection` directory, create a text file named
|
file, in the `TensorJS-Face-Detection` directory, create a text file named
|
||||||
|
|
|
@ -109,7 +109,7 @@ This command starts only the services associated with the `dev` profile,
|
||||||
leaving the rest inactive.
|
leaving the rest inactive.
|
||||||
|
|
||||||
For more information on using profiles, see [Using profiles with
|
For more information on using profiles, see [Using profiles with
|
||||||
Compose](/compose/profiles/).
|
Compose](/compose/how-tos/profiles/).
|
||||||
|
|
||||||
### How can I enforce the database service to start up before the frontend service?
|
### How can I enforce the database service to start up before the frontend service?
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ before starting. This ensures the database is not only up but also ready to
|
||||||
handle requests.
|
handle requests.
|
||||||
|
|
||||||
For more information on setting the startup order of your services, see
|
For more information on setting the startup order of your services, see
|
||||||
[Control startup and shutdown order in Compose](/compose/startup-order/).
|
[Control startup and shutdown order in Compose](/compose/how-tos/startup-order/).
|
||||||
|
|
||||||
### Can I use Compose to build a Docker image?
|
### Can I use Compose to build a Docker image?
|
||||||
|
|
||||||
|
@ -166,9 +166,9 @@ tests or perform one-off tasks within that container.
|
||||||
|
|
||||||
- [Overview of Docker Compose CLI](/compose/reference/)
|
- [Overview of Docker Compose CLI](/compose/reference/)
|
||||||
- [Overview of Docker Compose](/compose/)
|
- [Overview of Docker Compose](/compose/)
|
||||||
- [How Compose works](/compose/compose-application-model/)
|
- [How Compose works](/compose/intro/compose-application-model/)
|
||||||
- [Using profiles with Compose](/compose/profiles/)
|
- [Using profiles with Compose](/compose/how-tos/profiles/)
|
||||||
- [Control startup and shutdown order with Compose](/compose/startup-order/)
|
- [Control startup and shutdown order with Compose](/compose/how-tos/startup-order/)
|
||||||
- [Compose Build Specification](/compose/compose-file/build/)
|
- [Compose Build Specification](/compose/compose-file/build/)
|
||||||
|
|
||||||
{{< /accordion >}}
|
{{< /accordion >}}
|
||||||
|
|
|
@ -15,7 +15,7 @@ grid:
|
||||||
- title: How Compose works
|
- title: How Compose works
|
||||||
description: Understand how Compose works
|
description: Understand how Compose works
|
||||||
icon: category
|
icon: category
|
||||||
link: /compose/compose-application-model/
|
link: /compose/intro/compose-application-model/
|
||||||
- title: Install Compose
|
- title: Install Compose
|
||||||
description: Follow the instructions on how to install Docker Compose.
|
description: Follow the instructions on how to install Docker Compose.
|
||||||
icon: download
|
icon: download
|
||||||
|
@ -41,7 +41,7 @@ grid:
|
||||||
- title: Migrate to Compose V2
|
- title: Migrate to Compose V2
|
||||||
description: Learn how to migrate from Compose V1 to V2
|
description: Learn how to migrate from Compose V1 to V2
|
||||||
icon: folder_delete
|
icon: folder_delete
|
||||||
link: /compose/migrate/
|
link: /compose/releases/migrate/
|
||||||
aliases:
|
aliases:
|
||||||
- /compose/cli-command/
|
- /compose/cli-command/
|
||||||
- /compose/networking/swarm/
|
- /compose/networking/swarm/
|
||||||
|
|
|
@ -3,7 +3,7 @@ description: Understand what Compose Bridge is and how it can be useful
|
||||||
keywords: compose, orchestration, kubernetes, bridge
|
keywords: compose, orchestration, kubernetes, bridge
|
||||||
title: Overview of Compose Bridge
|
title: Overview of Compose Bridge
|
||||||
linkTitle: Compose Bridge
|
linkTitle: Compose Bridge
|
||||||
weight: 180
|
weight: 50
|
||||||
---
|
---
|
||||||
|
|
||||||
{{< include "compose-bridge-experimental.md" >}}
|
{{< include "compose-bridge-experimental.md" >}}
|
||||||
|
|
|
@ -7,7 +7,7 @@ keywords: docker compose example, docker compose tutorial, how to use docker com
|
||||||
file, run a docker compose file
|
file, run a docker compose file
|
||||||
title: Docker Compose Quickstart
|
title: Docker Compose Quickstart
|
||||||
linkTitle: Quickstart
|
linkTitle: Quickstart
|
||||||
weight: 40
|
weight: 30
|
||||||
---
|
---
|
||||||
|
|
||||||
This tutorial aims to introduce fundamental concepts of Docker Compose by guiding you through the development of a basic Python web application.
|
This tutorial aims to introduce fundamental concepts of Docker Compose by guiding you through the development of a basic Python web application.
|
||||||
|
@ -241,7 +241,7 @@ services:
|
||||||
|
|
||||||
Whenever a file is changed, Compose syncs the file to the corresponding location under `/code` inside the container. Once copied, the bundler updates the running application without a restart.
|
Whenever a file is changed, Compose syncs the file to the corresponding location under `/code` inside the container. Once copied, the bundler updates the running application without a restart.
|
||||||
|
|
||||||
For more information on how Compose Watch works, see [Use Compose Watch](file-watch.md). Alternatively, see [Manage data in containers](/manuals/engine/storage/volumes.md) for other options.
|
For more information on how Compose Watch works, see [Use Compose Watch](/manuals/compose/how-tos/file-watch.md). Alternatively, see [Manage data in containers](/manuals/engine/storage/volumes.md) for other options.
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
>
|
>
|
||||||
|
@ -316,7 +316,7 @@ Using multiple Compose files lets you customize a Compose application for differ
|
||||||
|
|
||||||
4. Run `docker compose up` to build the app with the updated Compose files, and run it. You should see the `Hello world` message in your browser.
|
4. Run `docker compose up` to build the app with the updated Compose files, and run it. You should see the `Hello world` message in your browser.
|
||||||
|
|
||||||
This is a simplified example, but it demonstrates the basic principle of `include` and how it can make it easier to modularize complex applications into sub-Compose files. For more information on `include` and working with multiple Compose files, see [Working with multiple Compose files](multiple-compose-files/_index.md).
|
This is a simplified example, but it demonstrates the basic principle of `include` and how it can make it easier to modularize complex applications into sub-Compose files. For more information on `include` and working with multiple Compose files, see [Working with multiple Compose files](/manuals/compose/how-tos/multiple-compose-files/_index.md).
|
||||||
|
|
||||||
## Step 8: Experiment with some other commands
|
## Step 8: Experiment with some other commands
|
||||||
|
|
||||||
|
@ -349,6 +349,6 @@ This is a simplified example, but it demonstrates the basic principle of `includ
|
||||||
## Where to go next
|
## Where to go next
|
||||||
|
|
||||||
- Try the [Sample apps with Compose](https://github.com/docker/awesome-compose)
|
- Try the [Sample apps with Compose](https://github.com/docker/awesome-compose)
|
||||||
- [Explore the full list of Compose commands](reference/_index.md)
|
- [Explore the full list of Compose commands](/reference/cli/docker/compose.md)
|
||||||
- [Explore the Compose file reference](/reference/compose-file/_index.md)
|
- [Explore the Compose file reference](/reference/compose-file/_index.md)
|
||||||
- [Check out the Learning Docker Compose video on LinkedIn Learning](https://www.linkedin.com/learning/learning-docker-compose/)
|
- [Check out the Learning Docker Compose video on LinkedIn Learning](https://www.linkedin.com/learning/learning-docker-compose/)
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
build:
|
||||||
|
render: never
|
||||||
|
title: How-tos
|
||||||
|
weight: 40
|
||||||
|
---
|
|
@ -1,10 +1,12 @@
|
||||||
---
|
---
|
||||||
title: Environment variables in Compose
|
title: Environment variables in Compose
|
||||||
linkTitle: Environment variables
|
linkTitle: Use environment variables
|
||||||
weight: 60
|
weight: 40
|
||||||
description: Explainer on the ways to set, use and manage environment variables in
|
description: Explainer on the ways to set, use and manage environment variables in
|
||||||
Compose
|
Compose
|
||||||
keywords: compose, orchestration, environment, env file
|
keywords: compose, orchestration, environment, env file
|
||||||
|
aliases:
|
||||||
|
- /compose/environment-variables/
|
||||||
---
|
---
|
||||||
|
|
||||||
By leveraging environment variables and interpolation in Docker Compose, you can create versatile and reusable configurations, making your Dockerized applications easier to manage and deploy across different environments.
|
By leveraging environment variables and interpolation in Docker Compose, you can create versatile and reusable configurations, making your Dockerized applications easier to manage and deploy across different environments.
|
|
@ -5,6 +5,9 @@ description: Explainer on the best ways to set, use, and manage environment vari
|
||||||
Compose
|
Compose
|
||||||
keywords: compose, orchestration, environment, env file, environment variables
|
keywords: compose, orchestration, environment, env file, environment variables
|
||||||
tags: [Best practices]
|
tags: [Best practices]
|
||||||
|
weight: 50
|
||||||
|
aliases:
|
||||||
|
- /compose/environment-variables/best-practices/
|
||||||
---
|
---
|
||||||
|
|
||||||
#### Handle sensitive information securely
|
#### Handle sensitive information securely
|
|
@ -4,8 +4,10 @@ linkTitle: Environment variables precedence
|
||||||
description: Scenario overview illustrating how environment variables are resolved
|
description: Scenario overview illustrating how environment variables are resolved
|
||||||
in Compose
|
in Compose
|
||||||
keywords: compose, environment, env file
|
keywords: compose, environment, env file
|
||||||
|
weight: 20
|
||||||
aliases:
|
aliases:
|
||||||
- /compose/envvars-precedence/
|
- /compose/envvars-precedence/
|
||||||
|
- /compose/environment-variables/envvvars-precedence/
|
||||||
---
|
---
|
||||||
|
|
||||||
When the same environment variable is set in multiple sources, Docker Compose follows a precedence rule to determine the value for that variable in your container's environment.
|
When the same environment variable is set in multiple sources, Docker Compose follows a precedence rule to determine the value for that variable in your container's environment.
|
|
@ -3,8 +3,10 @@ description: Compose pre-defined environment variables
|
||||||
keywords: fig, composition, compose, docker, orchestration, cli, reference
|
keywords: fig, composition, compose, docker, orchestration, cli, reference
|
||||||
title: Set or change pre-defined environment variables in Docker Compose
|
title: Set or change pre-defined environment variables in Docker Compose
|
||||||
linkTitle: Pre-defined environment variables
|
linkTitle: Pre-defined environment variables
|
||||||
|
weight: 30
|
||||||
aliases:
|
aliases:
|
||||||
- /compose/reference/envvars/
|
- /compose/reference/envvars/
|
||||||
|
- /compose/environment-variables/envvars/
|
||||||
---
|
---
|
||||||
|
|
||||||
Compose already comes with pre-defined environment variables. It also inherits common Docker CLI environment variables, such as `DOCKER_HOST` and `DOCKER_CONTEXT`. See [Docker CLI environment variable reference](/reference/cli/docker/#environment-variables) for details.
|
Compose already comes with pre-defined environment variables. It also inherits common Docker CLI environment variables, such as `DOCKER_HOST` and `DOCKER_CONTEXT`. See [Docker CLI environment variable reference](/reference/cli/docker/#environment-variables) for details.
|
||||||
|
@ -184,7 +186,7 @@ This is an opt-out variable. When turned off it deactivates the experimental fea
|
||||||
## Unsupported in Compose V2
|
## Unsupported in Compose V2
|
||||||
|
|
||||||
The following environment variables have no effect in Compose V2.
|
The following environment variables have no effect in Compose V2.
|
||||||
For more information, see [Migrate to Compose V2](../migrate.md).
|
For more information, see [Migrate to Compose V2](/manuals/compose/releases/migrate.md).
|
||||||
|
|
||||||
- `COMPOSE_API_VERSION`
|
- `COMPOSE_API_VERSION`
|
||||||
By default the API version is negotiated with the server. Use `DOCKER_API_VERSION`.
|
By default the API version is negotiated with the server. Use `DOCKER_API_VERSION`.
|
|
@ -7,6 +7,7 @@ keywords: compose, orchestration, environment, environment variables, container
|
||||||
aliases:
|
aliases:
|
||||||
- /compose/env/
|
- /compose/env/
|
||||||
- /compose/link-env-deprecated/
|
- /compose/link-env-deprecated/
|
||||||
|
- /compose/set-environment-variables/
|
||||||
---
|
---
|
||||||
|
|
||||||
A container's environment is not set until there's an explicit entry in the service configuration to make this happen. With Compose, there are two ways you can set environment variables in your containers with your Compose file.
|
A container's environment is not set until there's an explicit entry in the service configuration to make this happen. With Compose, there are two ways you can set environment variables in your containers with your Compose file.
|
|
@ -3,9 +3,11 @@ title: Set, use, and manage variables in a Compose file with interpolation
|
||||||
linkTitle: Interpolation
|
linkTitle: Interpolation
|
||||||
description: How to set, use, and manage variables in your Compose file with interpolation
|
description: How to set, use, and manage variables in your Compose file with interpolation
|
||||||
keywords: compose, orchestration, environment, variables, interpolation
|
keywords: compose, orchestration, environment, variables, interpolation
|
||||||
|
weight: 40
|
||||||
aliases:
|
aliases:
|
||||||
- /compose/env-file/
|
- /compose/env-file/
|
||||||
- /compose/environment-variables/env-file/
|
- /compose/environment-variables/env-file/
|
||||||
|
- /compose/environment-variables/variable-interpolation/
|
||||||
---
|
---
|
||||||
|
|
||||||
A Compose file can use variables to offer more flexibility. If you want to quickly switch
|
A Compose file can use variables to offer more flexibility. If you want to quickly switch
|
|
@ -2,10 +2,12 @@
|
||||||
description: Use File watch to automatically update running services as you work
|
description: Use File watch to automatically update running services as you work
|
||||||
keywords: compose, file watch, experimental
|
keywords: compose, file watch, experimental
|
||||||
title: Use Compose Watch
|
title: Use Compose Watch
|
||||||
weight: 80
|
weight: 50
|
||||||
|
aliases:
|
||||||
|
- /compose/file-watch/
|
||||||
---
|
---
|
||||||
|
|
||||||
{{< introduced compose 2.22.0 "release-notes.md#2220" >}}
|
{{< introduced compose 2.22.0 "/manuals/compose/releases/release-notes.md#2220" >}}
|
||||||
|
|
||||||
{{< include "compose/watch.md" >}}
|
{{< include "compose/watch.md" >}}
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
---
|
---
|
||||||
description: Understand GPU support in Docker Compose
|
description: Understand GPU support in Docker Compose
|
||||||
keywords: documentation, docs, docker, compose, GPU access, NVIDIA, samples
|
keywords: documentation, docs, docker, compose, GPU access, NVIDIA, samples
|
||||||
title: Turn on GPU access with Docker Compose
|
title: Enable GPU access with Docker Compose
|
||||||
linkTitle: GPU support
|
linkTitle: Enable GPU support
|
||||||
weight: 120
|
weight: 90
|
||||||
|
aliases:
|
||||||
|
- /compose/gpu-support/
|
||||||
---
|
---
|
||||||
|
|
||||||
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.
|
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.
|
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](migrate.md).
|
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
|
## Enabling GPU access to service containers
|
||||||
|
|
|
@ -2,8 +2,10 @@
|
||||||
description: General overview for the different ways you can work with multiple compose
|
description: General overview for the different ways you can work with multiple compose
|
||||||
files in Docker Compose
|
files in Docker Compose
|
||||||
keywords: compose, compose file, merge, extends, include, docker compose, -f flag
|
keywords: compose, compose file, merge, extends, include, docker compose, -f flag
|
||||||
linkTitle: Working with multiple Compose files
|
linkTitle: Use multiple Compose files
|
||||||
weight: 110
|
weight: 80
|
||||||
|
aliases:
|
||||||
|
- /compose/multiple-compose-files/
|
||||||
---
|
---
|
||||||
|
|
||||||
This section contains information on the ways you can work with multiple Compose files.
|
This section contains information on the ways you can work with multiple Compose files.
|
|
@ -4,8 +4,10 @@ description: How to use Docker Compose's extends keyword to share configuration
|
||||||
keywords: fig, composition, compose, docker, orchestration, documentation, docs
|
keywords: fig, composition, compose, docker, orchestration, documentation, docs
|
||||||
title: Extend your Compose file
|
title: Extend your Compose file
|
||||||
linkTitle: Extend
|
linkTitle: Extend
|
||||||
|
weight: 20
|
||||||
aliases:
|
aliases:
|
||||||
- /compose/extends/
|
- /compose/extends/
|
||||||
|
- /compose/multiple-compose-files/extends/
|
||||||
---
|
---
|
||||||
|
|
||||||
Docker Compose's [`extends` attribute](/reference/compose-file/services.md#extends)
|
Docker Compose's [`extends` attribute](/reference/compose-file/services.md#extends)
|
|
@ -2,10 +2,11 @@
|
||||||
description: How to use Docker Compose's include top-level element
|
description: How to use Docker Compose's include top-level element
|
||||||
keywords: compose, docker, include, compose file
|
keywords: compose, docker, include, compose file
|
||||||
title: Include
|
title: Include
|
||||||
linkTitle: Include
|
aliases:
|
||||||
|
- /compose/multiple-compose-files/include/
|
||||||
---
|
---
|
||||||
|
|
||||||
{{< introduced compose 2.20.3 "../release-notes.md#2203" >}}
|
{{< introduced compose 2.20.3 "/manuals/compose/releases/release-notes.md#2203" >}}
|
||||||
|
|
||||||
{{< include "compose/include.md" >}}
|
{{< include "compose/include.md" >}}
|
||||||
|
|
|
@ -3,6 +3,9 @@ description: How merging Compose files works
|
||||||
keywords: compose, docker, merge, compose file
|
keywords: compose, docker, merge, compose file
|
||||||
title: Merge Compose files
|
title: Merge Compose files
|
||||||
linkTitle: Merge
|
linkTitle: Merge
|
||||||
|
weight: 10
|
||||||
|
aliases:
|
||||||
|
- /compose/multiple-compose-files/merge/
|
||||||
---
|
---
|
||||||
|
|
||||||
Docker Compose lets you merge and override a set of Compose files together to create a composite Compose file.
|
Docker Compose lets you merge and override a set of Compose files together to create a composite Compose file.
|
|
@ -3,7 +3,9 @@ description: How Docker Compose sets up networking between containers
|
||||||
keywords: documentation, docs, docker, compose, orchestration, containers, networking
|
keywords: documentation, docs, docker, compose, orchestration, containers, networking
|
||||||
title: Networking in Compose
|
title: Networking in Compose
|
||||||
linkTitle: Networking
|
linkTitle: Networking
|
||||||
weight: 130
|
weight: 70
|
||||||
|
aliases:
|
||||||
|
- /compose/networking/
|
||||||
---
|
---
|
||||||
|
|
||||||
{{< include "compose-eol.md" >}}
|
{{< include "compose-eol.md" >}}
|
||||||
|
@ -17,7 +19,7 @@ other containers on that network, and discoverable by the service's name.
|
||||||
>
|
>
|
||||||
> Your app's network is given a name based on the "project name",
|
> Your app's network is given a name based on the "project name",
|
||||||
> which is based on the name of the directory it lives in. You can override the
|
> which is based on the name of the directory it lives in. You can override the
|
||||||
> project name with either the [`--project-name` flag](reference/_index.md)
|
> project name with either the [`--project-name` flag](/reference/cli/docker/compose.md)
|
||||||
> or the [`COMPOSE_PROJECT_NAME` environment variable](environment-variables/envvars.md#compose_project_name).
|
> or the [`COMPOSE_PROJECT_NAME` environment variable](environment-variables/envvars.md#compose_project_name).
|
||||||
|
|
||||||
For example, suppose your app is in a directory called `myapp`, and your `compose.yml` looks like this:
|
For example, suppose your app is in a directory called `myapp`, and your `compose.yml` looks like this:
|
|
@ -1,8 +1,10 @@
|
||||||
---
|
---
|
||||||
description: Guide to using Docker Compose in production
|
description: Guide to using Docker Compose in production
|
||||||
keywords: compose, orchestration, containers, production
|
keywords: compose, orchestration, containers, production
|
||||||
title: Compose in production
|
title: Use Compose in production
|
||||||
weight: 90
|
weight: 100
|
||||||
|
aliases:
|
||||||
|
- /compose/production/
|
||||||
---
|
---
|
||||||
|
|
||||||
When you define your app with Compose in development, you can use this
|
When you define your app with Compose in development, you can use this
|
|
@ -1,9 +1,11 @@
|
||||||
---
|
---
|
||||||
title: Using profiles with Compose
|
title: Using profiles with Compose
|
||||||
linkTitle: Use service profiles
|
linkTitle: Use service profiles
|
||||||
weight: 70
|
weight: 20
|
||||||
desription: How to use profiles with Docker Compose
|
desription: How to use profiles with Docker Compose
|
||||||
keywords: cli, compose, profile, profiles reference
|
keywords: cli, compose, profile, profiles reference
|
||||||
|
aliases:
|
||||||
|
- /compose/profiles/
|
||||||
---
|
---
|
||||||
|
|
||||||
{{< include "compose/profiles.md" >}}
|
{{< include "compose/profiles.md" >}}
|
||||||
|
@ -48,7 +50,7 @@ Valid profiles names follow the regex format of `[a-zA-Z0-9][a-zA-Z0-9_.-]+`.
|
||||||
|
|
||||||
## Start specific profiles
|
## Start specific profiles
|
||||||
|
|
||||||
To start a specific profile supply the `--profile` [command-line option](reference/_index.md) or
|
To start a specific profile supply the `--profile` [command-line option](/reference/cli/docker/compose.md) or
|
||||||
use the [`COMPOSE_PROFILES` environment variable](environment-variables/envvars.md#compose_profiles):
|
use the [`COMPOSE_PROFILES` environment variable](environment-variables/envvars.md#compose_profiles):
|
||||||
|
|
||||||
```console
|
```console
|
||||||
|
@ -175,7 +177,7 @@ $ COMPOSE_PROFILES=dev docker compose up phpmyadmin
|
||||||
|
|
||||||
## Stop specific profiles
|
## Stop specific profiles
|
||||||
|
|
||||||
As with starting specific profiles, you can use the `--profile` [command-line option](reference/_index.md) or
|
As with starting specific profiles, you can use the `--profile` [command-line option](/reference/cli/docker/compose.md#use--p-to-specify-a-project-name) or
|
||||||
use the [`COMPOSE_PROFILES` environment variable](environment-variables/envvars.md#compose_profiles):
|
use the [`COMPOSE_PROFILES` environment variable](environment-variables/envvars.md#compose_profiles):
|
||||||
|
|
||||||
```console
|
```console
|
|
@ -1,8 +1,10 @@
|
||||||
---
|
---
|
||||||
title: Specify a project name
|
title: Specify a project name
|
||||||
weight: 50
|
weight: 10
|
||||||
description: Understand the different ways you can set a project name in Compose and what the precedence is.
|
description: Understand the different ways you can set a project name in Compose and what the precedence is.
|
||||||
keywords: name, compose, project, -p flag, name top-level element
|
keywords: name, compose, project, -p flag, name top-level element
|
||||||
|
aliases:
|
||||||
|
- /compose/project-name/
|
||||||
---
|
---
|
||||||
|
|
||||||
In Compose, the default project name is derived from the base name of the project directory. However, you have the flexibility to set a custom project name.
|
In Compose, the default project name is derived from the base name of the project directory. However, you have the flexibility to set a custom project name.
|
||||||
|
@ -12,7 +14,7 @@ This page offers examples of scenarios where custom project names can be helpful
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
>
|
>
|
||||||
> The default project directory is the base directory of the Compose file. A custom value can also be set
|
> The default project directory is the base directory of the Compose file. A custom value can also be set
|
||||||
> for it using the [`--project-directory` command line option](reference/_index.md).
|
> for it using the [`--project-directory` command line option](/reference/cli/docker/compose.md#use--p-to-specify-a-project-name).
|
||||||
|
|
||||||
## Example use cases
|
## Example use cases
|
||||||
|
|
|
@ -3,8 +3,9 @@ description: How to control service startup and shutdown order in Docker Compose
|
||||||
keywords: documentation, docs, docker, compose, startup, shutdown, order
|
keywords: documentation, docs, docker, compose, startup, shutdown, order
|
||||||
title: Control startup and shutdown order in Compose
|
title: Control startup and shutdown order in Compose
|
||||||
linkTitle: Control startup order
|
linkTitle: Control startup order
|
||||||
weight: 120
|
weight: 30
|
||||||
notoc: true
|
aliases:
|
||||||
|
- /compose/startup-order/
|
||||||
---
|
---
|
||||||
|
|
||||||
You can control the order of service startup and shutdown with the
|
You can control the order of service startup and shutdown with the
|
|
@ -1,10 +1,12 @@
|
||||||
---
|
---
|
||||||
title: How to use secrets in Docker Compose
|
title: How to use secrets in Docker Compose
|
||||||
linkTitle: Secrets in Compose
|
linkTitle: Secrets in Compose
|
||||||
weight: 100
|
weight: 60
|
||||||
description: How to use secrets in Compose and their benefits
|
description: How to use secrets in Compose and their benefits
|
||||||
keywords: secrets, compose, security, environment variables
|
keywords: secrets, compose, security, environment variables
|
||||||
tags: [Secrets]
|
tags: [Secrets]
|
||||||
|
aliases:
|
||||||
|
- /compose/use-secrets/
|
||||||
---
|
---
|
||||||
|
|
||||||
A secret is any piece of data, such as a password, certificate, or API key, that shouldn’t be transmitted over a network or stored unencrypted in a Dockerfile or in your application’s source code.
|
A secret is any piece of data, such as a password, certificate, or API key, that shouldn’t be transmitted over a network or stored unencrypted in a Dockerfile or in your application’s source code.
|
|
@ -1,11 +1,12 @@
|
||||||
---
|
---
|
||||||
title: How Compose works
|
title: How Compose works
|
||||||
weight: 30
|
weight: 10
|
||||||
description: Understand how Compose works and the Compose application model with an illustrative example
|
description: Understand how Compose works and the Compose application model with an illustrative example
|
||||||
keywords: compose, docker compose, compose specification, compose model
|
keywords: compose, docker compose, compose specification, compose model
|
||||||
aliases:
|
aliases:
|
||||||
- /compose/compose-file/02-model/
|
- /compose/compose-file/02-model/
|
||||||
- /compose/compose-yaml-file/
|
- /compose/compose-yaml-file/
|
||||||
|
- /compose/compose-application-model/
|
||||||
---
|
---
|
||||||
|
|
||||||
With Docker Compose you use a YAML configuration file, known as the [Compose file](#the-compose-file), to configure your application’s services, and then you create and start all the services from your configuration with the [Compose CLI](#cli).
|
With Docker Compose you use a YAML configuration file, known as the [Compose file](#the-compose-file), to configure your application’s services, and then you create and start all the services from your configuration with the [Compose CLI](#cli).
|
||||||
|
@ -48,7 +49,7 @@ Multiple Compose files can be [merged](/reference/compose-file/merge.md) togethe
|
||||||
Simple attributes and maps get overridden by the highest order Compose file, lists get merged by appending. Relative
|
Simple attributes and maps get overridden by the highest order Compose file, lists get merged by appending. Relative
|
||||||
paths are resolved based on the first Compose file's parent folder, whenever complimentary files being
|
paths are resolved based on the first Compose file's parent folder, whenever complimentary files being
|
||||||
merged are hosted in other folders. As some Compose file elements can both be expressed as single strings or complex objects, merges apply to
|
merged are hosted in other folders. As some Compose file elements can both be expressed as single strings or complex objects, merges apply to
|
||||||
the expanded form. For more information, see [Working with multiple Compose files](multiple-compose-files/_index.md)
|
the expanded form. For more information, see [Working with multiple Compose files](/manuals/compose/how-tos/multiple-compose-files/_index.md)
|
||||||
|
|
||||||
If you want to reuse other Compose files, or factor out parts of your application model into separate Compose files, you can also use [`include`](/reference/compose-file/include.md). This is useful if your Compose application is dependent on another application which is managed by a different team, or needs to be shared with others.
|
If you want to reuse other Compose files, or factor out parts of your application model into separate Compose files, you can also use [`include`](/reference/compose-file/include.md). This is useful if your Compose application is dependent on another application which is managed by a different team, or needs to be shared with others.
|
||||||
|
|
||||||
|
@ -96,7 +97,7 @@ The backend stores data in a persistent volume.
|
||||||
|
|
||||||
Both services communicate with each other on an isolated back-tier network, while the frontend is also connected to a front-tier network and exposes port 443 for external usage.
|
Both services communicate with each other on an isolated back-tier network, while the frontend is also connected to a front-tier network and exposes port 443 for external usage.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
The example application is composed of the following parts:
|
The example application is composed of the following parts:
|
||||||
|
|
||||||
|
@ -161,6 +162,6 @@ example-backend-1 example/database "docker-entrypoint.s…" backend
|
||||||
|
|
||||||
## What's next
|
## What's next
|
||||||
|
|
||||||
- [Quickstart](gettingstarted.md)
|
- [Quickstart](/manuals/compose/gettingstarted.md)
|
||||||
- [Explore some sample applications](samples-for-compose.md)
|
- [Explore some sample applications](/manuals/compose/support-and-feedback/samples-for-compose.md)
|
||||||
- [Familiarize yourself with the Compose Specification](/reference/compose-file/_index.md)
|
- [Familiarize yourself with the Compose Specification](/reference/compose-file/_index.md)
|
|
@ -2,6 +2,7 @@
|
||||||
description: Key benefits and use cases of Docker Compose
|
description: Key benefits and use cases of Docker Compose
|
||||||
keywords: documentation, docs, docker, compose, orchestration, containers, uses, benefits
|
keywords: documentation, docs, docker, compose, orchestration, containers, uses, benefits
|
||||||
title: Why use Compose?
|
title: Why use Compose?
|
||||||
|
weight: 20
|
||||||
aliases:
|
aliases:
|
||||||
- /compose/features-uses/
|
- /compose/features-uses/
|
||||||
---
|
---
|
||||||
|
@ -60,10 +61,10 @@ Compose has traditionally been focused on development and testing workflows,
|
||||||
but with each release we're making progress on more production-oriented features.
|
but with each release we're making progress on more production-oriented features.
|
||||||
|
|
||||||
For details on using production-oriented features, see
|
For details on using production-oriented features, see
|
||||||
[Compose in production](../production.md).
|
[Compose in production](/manuals/compose/how-tos/production.md).
|
||||||
|
|
||||||
## What's next?
|
## What's next?
|
||||||
|
|
||||||
- [Learn about the history of Compose](history.md)
|
- [Learn about the history of Compose](history.md)
|
||||||
- [Understand how Compose works](../compose-application-model.md)
|
- [Understand how Compose works](compose-application-model.md)
|
||||||
- [Quickstart](../gettingstarted.md)
|
- [Quickstart](../gettingstarted.md)
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
---
|
---
|
||||||
title: History and development of Docker Compose
|
title: History and development of Docker Compose
|
||||||
|
linkTitle: History and development
|
||||||
description: History of Compose V1 and Compose YAML schema versioning
|
description: History of Compose V1 and Compose YAML schema versioning
|
||||||
keywords: compose, compose yaml, swarm, migration, compatibility, docker compose vs docker-compose
|
keywords: compose, compose yaml, swarm, migration, compatibility, docker compose vs docker-compose
|
||||||
|
weight: 30
|
||||||
aliases:
|
aliases:
|
||||||
- /compose/history/
|
- /compose/history/
|
||||||
---
|
---
|
||||||
|
@ -45,4 +47,4 @@ 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).
|
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](../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](/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,0 +1,6 @@
|
||||||
|
---
|
||||||
|
build:
|
||||||
|
render: never
|
||||||
|
title: Releases
|
||||||
|
weight: 70
|
||||||
|
---
|
|
@ -1,11 +1,12 @@
|
||||||
---
|
---
|
||||||
title: Migrate to Compose V2
|
title: Migrate to Compose V2
|
||||||
weight: 160
|
weight: 20
|
||||||
description: How to migrate from Compose V1 to V2
|
description: How to migrate from Compose V1 to V2
|
||||||
keywords: compose, upgrade, migration, v1, v2, docker compose vs docker-compose
|
keywords: compose, upgrade, migration, v1, v2, docker compose vs docker-compose
|
||||||
aliases:
|
aliases:
|
||||||
- /compose/compose-v2/
|
- /compose/compose-v2/
|
||||||
- /compose/cli-command-compatibility/
|
- /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.
|
From July 2023 Compose V1 stopped receiving updates. It’s also no longer available in new releases of Docker Desktop.
|
||||||
|
@ -20,8 +21,8 @@ With Docker Desktop, Compose V2 is always accessible as `docker compose`.
|
||||||
Additionally, the **Use Compose V2** setting is turned on by default, which provides an alias from `docker-compose`.
|
Additionally, the **Use Compose V2** setting is turned on by default, which provides an alias from `docker-compose`.
|
||||||
|
|
||||||
For manual installs on Linux, you can get Compose V2 by either:
|
For manual installs on Linux, you can get Compose V2 by either:
|
||||||
- [Using Docker's repository](install/linux.md#install-using-the-repository) (recommended)
|
- [Using Docker's repository](/manuals/compose/install/linux.md#install-using-the-repository) (recommended)
|
||||||
- [Downloading and installing manually](install/linux.md#install-the-plugin-manually)
|
- [Downloading and installing manually](/manuals/compose/install/linux.md#install-the-plugin-manually)
|
||||||
|
|
||||||
## What are the differences between Compose V1 and Compose V2?
|
## What are the differences between Compose V1 and Compose V2?
|
||||||
|
|
||||||
|
@ -78,7 +79,7 @@ The following behave differently between Compose V1 and V2:
|
||||||
|
|
||||||
Environment variable behavior in Compose V1 wasn't formally documented and behaved inconsistently in some edge cases.
|
Environment variable behavior in Compose V1 wasn't formally documented and behaved inconsistently in some edge cases.
|
||||||
|
|
||||||
For Compose V2, the [Environment variables](/compose/environment-variables/) section covers both [precedence](/compose/environment-variables/envvars-precedence) as well as [`.env` file interpolation](environment-variables/variable-interpolation.md) and includes many examples covering tricky situations such as escaping nested quotes.
|
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:
|
Check if:
|
||||||
- Your project uses multiple levels of environment variable overrides, for example `.env` file and `--env` CLI flags.
|
- Your project uses multiple levels of environment variable overrides, for example `.env` file and `--env` CLI flags.
|
|
@ -1,12 +1,14 @@
|
||||||
---
|
---
|
||||||
title: Docker Compose release notes
|
title: Docker Compose release notes
|
||||||
weight: 999
|
linkTitle: Release notes
|
||||||
|
weight: 10
|
||||||
description: Learn about the new features, bug fixes, and breaking changes for the newest Docker Compose release
|
description: Learn about the new features, bug fixes, and breaking changes for the newest Docker Compose release
|
||||||
keywords: release notes, compose
|
keywords: release notes, compose
|
||||||
tags: [Release notes]
|
tags: [Release notes]
|
||||||
toc_max: 2
|
toc_max: 2
|
||||||
aliases:
|
aliases:
|
||||||
- /release-notes/docker-compose/
|
- /release-notes/docker-compose/
|
||||||
|
- /compose/release-notes/
|
||||||
---
|
---
|
||||||
|
|
||||||
For more detailed information, see the [release notes in the Compose repo](https://github.com/docker/compose/releases/).
|
For more detailed information, see the [release notes in the Compose repo](https://github.com/docker/compose/releases/).
|
||||||
|
@ -435,7 +437,7 @@ This release fixes a build issue with Docker Desktop for Windows introduced in C
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
>
|
>
|
||||||
> The `watch` command is now generally available (GA). You can directly use it from the root command `docker compose watch`.
|
> The `watch` command is now generally available (GA). You can directly use it from the root command `docker compose watch`.
|
||||||
> For more information, see [File watch](./file-watch.md).
|
> For more information, see [File watch](/manuals/compose/how-tos/file-watch.md).
|
||||||
|
|
||||||
### Update
|
### Update
|
||||||
|
|
||||||
|
@ -3308,7 +3310,7 @@ naming scheme accordingly before upgrading.
|
||||||
|
|
||||||
By default, you don't have to configure any networks. In fact, using
|
By default, you don't have to configure any networks. In fact, using
|
||||||
networking with Compose involves even less configuration than using links.
|
networking with Compose involves even less configuration than using links.
|
||||||
Consult the [networking guide](/manuals/compose/networking.md) for how to use it.
|
Consult the [networking guide](/manuals/compose/how-tos/networking.md) for how to use it.
|
||||||
|
|
||||||
The experimental flags `--x-networking` and `--x-network-driver`, introduced
|
The experimental flags `--x-networking` and `--x-network-driver`, introduced
|
||||||
in Compose 1.5, have been removed.
|
in Compose 1.5, have been removed.
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
build:
|
||||||
|
render: never
|
||||||
|
title: Support and feedback
|
||||||
|
weight: 60
|
||||||
|
---
|
|
@ -2,8 +2,11 @@
|
||||||
description: Frequently asked questions for Docker Compose
|
description: Frequently asked questions for Docker Compose
|
||||||
keywords: documentation, docs, docker, compose, faq, docker compose vs docker-compose
|
keywords: documentation, docs, docker, compose, faq, docker compose vs docker-compose
|
||||||
title: Compose FAQs
|
title: Compose FAQs
|
||||||
weight: 170
|
linkTitle: FAQs
|
||||||
|
weight: 10
|
||||||
tags: [FAQ]
|
tags: [FAQ]
|
||||||
|
aliases:
|
||||||
|
- /compose/faq/
|
||||||
---
|
---
|
||||||
|
|
||||||
### What is the difference between `docker compose` and `docker-compose`
|
### What is the difference between `docker compose` and `docker-compose`
|
||||||
|
@ -12,7 +15,7 @@ Version one of the Docker Compose command-line binary was first released in 2014
|
||||||
|
|
||||||
Version two of the Docker Compose command-line binary was announced in 2020, is written in Go, and is invoked with `docker compose`. Compose V2 ignores the version top-level element in the compose.yml file.
|
Version two of the Docker Compose command-line binary was announced in 2020, is written in Go, and is invoked with `docker compose`. Compose V2 ignores the version top-level element in the compose.yml file.
|
||||||
|
|
||||||
For further information, see [History and development of Compose](intro/history.md).
|
For further information, see [History and development of Compose](/manuals/compose/intro/history.md).
|
||||||
|
|
||||||
### What's the difference between `up`, `run`, and `start`?
|
### What's the difference between `up`, `run`, and `start`?
|
||||||
|
|
||||||
|
@ -78,8 +81,8 @@ handling `SIGTERM` properly.
|
||||||
|
|
||||||
Compose uses the project name to create unique identifiers for all of a
|
Compose uses the project name to create unique identifiers for all of a
|
||||||
project's containers and other resources. To run multiple copies of a project,
|
project's containers and other resources. To run multiple copies of a project,
|
||||||
set a custom project name using the [`-p` command line option](reference/_index.md)
|
set a custom project name using the `-p` command line option
|
||||||
or the [`COMPOSE_PROJECT_NAME` environment variable](environment-variables/envvars.md#compose_project_name).
|
or the [`COMPOSE_PROJECT_NAME` environment variable](/manuals/compose/how-tos/environment-variables/envvars.md#compose_project_name).
|
||||||
|
|
||||||
### Can I use JSON instead of YAML for my Compose file?
|
### Can I use JSON instead of YAML for my Compose file?
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
description: Find a way to provide feedback on Docker Compose that's right for you
|
description: Find a way to provide feedback on Docker Compose that's right for you
|
||||||
keywords: Feedback, Docker Compose, Community forum, bugs, problems, issues
|
keywords: Feedback, Docker Compose, Community forum, bugs, problems, issues
|
||||||
title: Give feedback
|
title: Give feedback
|
||||||
weight: 150
|
weight: 20
|
||||||
|
aliases:
|
||||||
|
- /compose/feedback/
|
||||||
---
|
---
|
||||||
|
|
||||||
There are many ways you can provide feedback on Docker Compose.
|
There are many ways you can provide feedback on Docker Compose.
|
|
@ -3,11 +3,13 @@ description: Summary of samples related to Compose
|
||||||
keywords: documentation, docs, docker, compose, samples
|
keywords: documentation, docs, docker, compose, samples
|
||||||
title: Sample apps with Compose
|
title: Sample apps with Compose
|
||||||
linkTitle: Sample apps
|
linkTitle: Sample apps
|
||||||
weight: 140
|
weight: 30
|
||||||
|
aliases:
|
||||||
|
- /compose/samples-for-compose/
|
||||||
---
|
---
|
||||||
|
|
||||||
The following samples show the various aspects of how to work with Docker
|
The following samples show the various aspects of how to work with Docker
|
||||||
Compose. As a prerequisite, be sure to [install Docker Compose](install/_index.md)
|
Compose. As a prerequisite, be sure to [install Docker Compose](/manuals/compose/install/_index.md)
|
||||||
if you have not already done so.
|
if you have not already done so.
|
||||||
|
|
||||||
## Key concepts these samples cover
|
## Key concepts these samples cover
|
|
@ -78,7 +78,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. For more information and for instructions on how to use Dev Environments, see [Development Environments Preview](../dev-environments/_index.md).
|
**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. For more information and for instructions on how to use Dev Environments, see [Development Environments Preview](../dev-environments/_index.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/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](/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.
|
||||||
|
|
||||||
### Bug fixes and minor changes
|
### Bug fixes and minor changes
|
||||||
|
|
||||||
|
@ -91,7 +91,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. For more information and for instructions on how to use Dev Environments, see [Development Environments Preview](../dev-environments/_index.md).
|
**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. For more information and for instructions on how to use Dev Environments, see [Development Environments Preview](../dev-environments/_index.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/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](/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.
|
||||||
|
|
||||||
### Upgrades
|
### Upgrades
|
||||||
|
|
||||||
|
@ -123,7 +123,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).
|
**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/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](/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.
|
||||||
|
|
||||||
**Skip Docker Desktop updates**: All users can now skip an update when they are prompted to install individual Docker Desktop releases.
|
**Skip Docker Desktop updates**: All users can now skip an update when they are prompted to install individual Docker Desktop releases.
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,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. For more information and for instructions on how to use Dev Environments, see [Development Environments Preview](../dev-environments/_index.md).
|
**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. For more information and for instructions on how to use Dev Environments, see [Development Environments Preview](../dev-environments/_index.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/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](/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.
|
||||||
|
|
||||||
### Bug fixes and minor changes
|
### Bug fixes and minor changes
|
||||||
|
|
||||||
|
@ -99,7 +99,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. For more information and for instructions on how to use Dev Environments, see [Development Environments Preview](../dev-environments/_index.md).
|
**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. For more information and for instructions on how to use Dev Environments, see [Development Environments Preview](../dev-environments/_index.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/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](/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.
|
||||||
|
|
||||||
### Upgrades
|
### Upgrades
|
||||||
|
|
||||||
|
@ -130,7 +130,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).
|
**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/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](/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.
|
||||||
|
|
||||||
**Skip Docker Desktop updates**: All users can now skip an update when they are prompted to install individual Docker Desktop releases.
|
**Skip Docker Desktop updates**: All users can now skip an update when they are prompted to install individual Docker Desktop releases.
|
||||||
|
|
||||||
|
|
|
@ -463,7 +463,7 @@ This can be resolved by adding the user to the **docker-users** group. Before st
|
||||||
- Docker Engine and CLI updated to [Moby 26.0](https://github.com/moby/moby/releases/tag/v26.0.0). This includes Buildkit 0.13, sub volumes mounts, networking updates, and improvements to the containerd multi-platform image store UX.
|
- Docker Engine and CLI updated to [Moby 26.0](https://github.com/moby/moby/releases/tag/v26.0.0). This includes Buildkit 0.13, sub volumes mounts, networking updates, and improvements to the containerd multi-platform image store UX.
|
||||||
- New and improved Docker Desktop error screens: swift troubleshooting, easy diagnostics uploads, and actionable remediation.
|
- New and improved Docker Desktop error screens: swift troubleshooting, easy diagnostics uploads, and actionable remediation.
|
||||||
- Compose supports [Synchronized file shares (experimental)](synchronized-file-sharing.md).
|
- Compose supports [Synchronized file shares (experimental)](synchronized-file-sharing.md).
|
||||||
- New [interactive Compose CLI (experimental)](/manuals/compose/environment-variables/envvars.md#compose_menu).
|
- New [interactive Compose CLI (experimental)](/manuals/compose/how-tos/environment-variables/envvars.md#compose_menu).
|
||||||
- Beta release of:
|
- Beta release of:
|
||||||
- Air-Gapped Containers with [Settings Management](/manuals/security/for-admins/hardened-desktop/air-gapped-containers/_index.md).
|
- Air-Gapped Containers with [Settings Management](/manuals/security/for-admins/hardened-desktop/air-gapped-containers/_index.md).
|
||||||
- [Host networking](/manuals/engine/network/drivers/host.md#docker-desktop) in Docker Desktop.
|
- [Host networking](/manuals/engine/network/drivers/host.md#docker-desktop) in Docker Desktop.
|
||||||
|
@ -960,7 +960,7 @@ This can be resolved by adding the user to the **docker-users** group. Before st
|
||||||
### New
|
### New
|
||||||
|
|
||||||
- The new Notification center is now available to all users so you can be notified of new releases, installation progress updates, and more. Select the bell icon in the bottom-right corner of the Docker Dashboard to access the notification center.
|
- The new Notification center is now available to all users so you can be notified of new releases, installation progress updates, and more. Select the bell icon in the bottom-right corner of the Docker Dashboard to access the notification center.
|
||||||
- Compose Watch is now available to all users. For more information, see [Use Compose Watch](/manuals/compose/file-watch.md).
|
- Compose Watch is now available to all users. For more information, see [Use Compose Watch](/manuals/compose/how-tos/file-watch.md).
|
||||||
- Resource Saver is now available to all users and is enabled by default. To configure this feature, navigate to the **Resources** tab in **Settings**. For more information see [Docker Desktop's Resource Saver mode](use-desktop/resource-saver.md).
|
- Resource Saver is now available to all users and is enabled by default. To configure this feature, navigate to the **Resources** tab in **Settings**. For more information see [Docker Desktop's Resource Saver mode](use-desktop/resource-saver.md).
|
||||||
- You can now view and manage the Docker Engine state, with pause, stop, and resume, directly from the Docker Dashboard.
|
- You can now view and manage the Docker Engine state, with pause, stop, and resume, directly from the Docker Dashboard.
|
||||||
|
|
||||||
|
@ -1041,7 +1041,7 @@ This can be resolved by adding the user to the **docker-users** group. Before st
|
||||||
|
|
||||||
### Removed
|
### 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/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. For more information, see [Migrate to Compose V2](/manuals/compose/releases/migrate.md).
|
||||||
|
|
||||||
### Bug fixes and enhancements
|
### Bug fixes and enhancements
|
||||||
|
|
||||||
|
@ -1123,7 +1123,7 @@ This can be resolved by adding the user to the **docker-users** group. Before st
|
||||||
### New
|
### New
|
||||||
|
|
||||||
- [Resource Usage](use-desktop/container.md) has moved from experimental to GA.
|
- [Resource Usage](use-desktop/container.md) has moved from experimental to GA.
|
||||||
- You can now split large Compose projects into multiple sub-projects with [`include`](/manuals/compose/multiple-compose-files/include.md).
|
- You can now split large Compose projects into multiple sub-projects with [`include`](/manuals/compose/how-tos/multiple-compose-files/include.md).
|
||||||
|
|
||||||
### Bug fixes and enhancements
|
### Bug fixes and enhancements
|
||||||
|
|
||||||
|
@ -1306,7 +1306,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 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](install/mac-install.md#install-from-the-command-line) and [Windows](install/windows-install.md#install-from-the-command-line), or alternatively by setting the values in the `install-settings.json` file.
|
- 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](install/mac-install.md#install-from-the-command-line) and [Windows](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.
|
- 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/migrate.md). Can be suppressed with `COMPOSE_V1_EOL_SILENT=1`.
|
- 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`.
|
||||||
- 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.
|
- 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.
|
- Improved UI for image table, allowing rows to use more available space.
|
||||||
- Fixed various bugs in port-forwarding.
|
- Fixed various bugs in port-forwarding.
|
||||||
|
@ -1867,7 +1867,7 @@ This can be resolved by adding the user to the **docker-users** group. Before st
|
||||||
|
|
||||||
- Compose V2 is now enabled after factory reset.
|
- Compose V2 is now enabled after factory reset.
|
||||||
- Compose V2 is now enabled by default on new installations of Docker Desktop.
|
- Compose V2 is now enabled by default on new installations of Docker Desktop.
|
||||||
- Precedence order of environment variables in Compose is more consistent, and clearly [documented](/manuals/compose/environment-variables/envvars-precedence.md).
|
- Precedence order of environment variables in Compose is more consistent, and clearly [documented](/manuals/compose/how-tos/environment-variables/envvars-precedence.md).
|
||||||
- Upgraded kernel to 5.10.124.
|
- Upgraded kernel to 5.10.124.
|
||||||
- Improved overall performance issues caused by calculating disk size. Related to [docker/for-win#9401](https://github.com/docker/for-win/issues/9401).
|
- Improved overall performance issues caused by calculating disk size. Related to [docker/for-win#9401](https://github.com/docker/for-win/issues/9401).
|
||||||
- Docker Desktop now prevents users on ARM macs without Rosetta installed from switching back to Compose V1, which has only intel binaries.
|
- Docker Desktop now prevents users on ARM macs without Rosetta installed from switching back to Compose V1, which has only intel binaries.
|
||||||
|
|
|
@ -90,7 +90,7 @@ In general, use your `.syncignore` file to exclude items that aren't critical to
|
||||||
|
|
||||||
- If you switch from WSL2 to Hyper-V on Windows, Docker Desktop needs to be fully restarted.
|
- If you switch from WSL2 to Hyper-V on Windows, Docker Desktop needs to be fully restarted.
|
||||||
|
|
||||||
- POSIX-style Windows paths are not supported. Avoid setting the [`COMPOSE_CONVERT_WINDOWS_PATHS`](/manuals/compose/environment-variables/envvars.md#compose_convert_windows_paths) environment variable in Docker Compose.
|
- POSIX-style Windows paths are not supported. Avoid setting the [`COMPOSE_CONVERT_WINDOWS_PATHS`](/manuals/compose/how-tos/environment-variables/envvars.md#compose_convert_windows_paths) environment variable in Docker Compose.
|
||||||
|
|
||||||
## Feedback and support
|
## Feedback and support
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ grid_developers:
|
||||||
- title: Secrets in Docker Compose
|
- title: Secrets in Docker Compose
|
||||||
description: Learn how to use secrets in Docker Compose.
|
description: Learn how to use secrets in Docker Compose.
|
||||||
icon: privacy_tip
|
icon: privacy_tip
|
||||||
link: /compose/use-secrets/
|
link: /compose/how-tos/use-secrets/
|
||||||
grid_resources:
|
grid_resources:
|
||||||
- title: Security FAQs
|
- title: Security FAQs
|
||||||
description: Explore common security FAQs.
|
description: Explore common security FAQs.
|
||||||
|
|
|
@ -42,7 +42,7 @@ aliases:
|
||||||
>
|
>
|
||||||
> Find more information about the [key features and use cases of Docker Compose](/manuals/compose/intro/features-uses.md) or [try the quickstart guide](/manuals/compose/gettingstarted.md).
|
> Find more information about the [key features and use cases of Docker Compose](/manuals/compose/intro/features-uses.md) or [try the quickstart guide](/manuals/compose/gettingstarted.md).
|
||||||
|
|
||||||
The Compose Specification is the latest and recommended version of the Compose file format. It helps you define a [Compose file](/manuals/compose/compose-application-model.md) which is used to configure your Docker application’s services, networks, volumes, and more.
|
The Compose Specification is the latest and recommended version of the Compose file format. It helps you define a [Compose file](/manuals/compose/intro/compose-application-model.md) which is used to configure your Docker application’s services, networks, volumes, and more.
|
||||||
|
|
||||||
Legacy versions 2.x and 3.x of the Compose file format were merged into the Compose Specification. It is implemented in versions 1.27.0 and above (also known as Compose V2) of the Docker Compose CLI.
|
Legacy versions 2.x and 3.x of the Compose file format were merged into the Compose Specification. It is implemented in versions 1.27.0 and above (also known as Compose V2) of the Docker Compose CLI.
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ Alternatively `build` can be an object with fields defined as follows:
|
||||||
|
|
||||||
### additional_contexts
|
### additional_contexts
|
||||||
|
|
||||||
{{< introduced compose 2.17.0 "/manuals/compose/release-notes.md#2170" >}}
|
{{< introduced compose 2.17.0 "/manuals/compose/releases/release-notes.md#2170" >}}
|
||||||
|
|
||||||
`additional_contexts` defines a list of named contexts the image builder should use during image build.
|
`additional_contexts` defines a list of named contexts the image builder should use during image build.
|
||||||
|
|
||||||
|
@ -229,7 +229,7 @@ build:
|
||||||
|
|
||||||
### dockerfile_inline
|
### dockerfile_inline
|
||||||
|
|
||||||
{{< introduced compose 2.17.0 "/manuals/compose/release-notes.md#2170" >}}
|
{{< introduced compose 2.17.0 "/manuals/compose/releases/release-notes.md#2170" >}}
|
||||||
|
|
||||||
`dockerfile_inline` defines the Dockerfile content as an inlined string in a Compose file. When set, the `dockerfile`
|
`dockerfile_inline` defines the Dockerfile content as an inlined string in a Compose file. When set, the `dockerfile`
|
||||||
attribute is not allowed and Compose rejects any Compose file having both set.
|
attribute is not allowed and Compose rejects any Compose file having both set.
|
||||||
|
@ -246,7 +246,7 @@ build:
|
||||||
|
|
||||||
### entitlements
|
### entitlements
|
||||||
|
|
||||||
{{< introduced compose 2.27.1 "/manuals/compose/release-notes.md#2271" >}}
|
{{< introduced compose 2.27.1 "/manuals/compose/releases/release-notes.md#2271" >}}
|
||||||
|
|
||||||
`entitlements` defines extra privileged entitlements to be allowed during the build.
|
`entitlements` defines extra privileged entitlements to be allowed during the build.
|
||||||
|
|
||||||
|
@ -273,7 +273,7 @@ extra_hosts:
|
||||||
- "myhostv6=[::1]"
|
- "myhostv6=[::1]"
|
||||||
```
|
```
|
||||||
|
|
||||||
The separator `=` is preferred, but `:` can also be used. Introduced in Docker Compose version [2.24.1](/manuals/compose/release-notes.md#2241). For example:
|
The separator `=` is preferred, but `:` can also be used. Introduced in Docker Compose version [2.24.1](/manuals/compose/releases/release-notes.md#2241). For example:
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
|
@ -392,7 +392,7 @@ Composes reports an error in the following cases:
|
||||||
|
|
||||||
### privileged
|
### privileged
|
||||||
|
|
||||||
{{< introduced compose 2.15.0 "/manuals/compose/release-notes.md#2" >}}
|
{{< introduced compose 2.15.0 "/manuals/compose/releases/release-notes.md#2" >}}
|
||||||
|
|
||||||
`privileged` configures the service image to build with elevated privileges. Support and actual impacts are platform specific.
|
`privileged` configures the service image to build with elevated privileges. Support and actual impacts are platform specific.
|
||||||
|
|
||||||
|
@ -555,7 +555,7 @@ build:
|
||||||
|
|
||||||
### ulimits
|
### ulimits
|
||||||
|
|
||||||
{{< introduced compose 2.23.1 "/manuals/compose/release-notes.md#2231" >}}
|
{{< introduced compose 2.23.1 "/manuals/compose/releases/release-notes.md#2231" >}}
|
||||||
|
|
||||||
`ulimits` overrides the default ulimits for a container. It's specified either as an integer for a single limit
|
`ulimits` overrides the default ulimits for a container. It's specified either as an integer for a single limit
|
||||||
or as mapping for soft/hard limits.
|
or as mapping for soft/hard limits.
|
||||||
|
|
|
@ -18,8 +18,8 @@ By default, the config:
|
||||||
The top-level `configs` declaration defines or references configuration data that is granted to services in your Compose application. The source of the config is either `file` or `external`.
|
The top-level `configs` declaration defines or references configuration data that is granted to services in your Compose application. The source of the config is either `file` or `external`.
|
||||||
|
|
||||||
- `file`: The config is created with the contents of the file at the specified path.
|
- `file`: The config is created with the contents of the file at the specified path.
|
||||||
- `environment`: The config content is created with the value of an environment variable. Introduced in Docker Compose version [2.23.1](/manuals/compose/release-notes.md#2231).
|
- `environment`: The config content is created with the value of an environment variable. Introduced in Docker Compose version [2.23.1](/manuals/compose/releases/release-notes.md#2231).
|
||||||
- `content`: The content is created with the inlined value. Introduced in Docker Compose version [2.23.1](/manuals/compose/release-notes.md#2231).
|
- `content`: The content is created with the inlined value. Introduced in Docker Compose version [2.23.1](/manuals/compose/releases/release-notes.md#2231).
|
||||||
- `external`: If set to true, `external` specifies that this config has already been created. Compose does not
|
- `external`: If set to true, `external` specifies that this config has already been created. Compose does not
|
||||||
attempt to create it, and if it does not exist, an error occurs.
|
attempt to create it, and if it does not exist, an error occurs.
|
||||||
- `name`: The name of the config object in the container engine to look up. This field can be used to
|
- `name`: The name of the config object in the container engine to look up. This field can be used to
|
||||||
|
|
|
@ -49,7 +49,7 @@ The `develop` subsection defines configuration options that are applied by Compo
|
||||||
### watch
|
### watch
|
||||||
|
|
||||||
The `watch` attribute defines a list of rules that control automatic service updates based on local file changes. `watch` is a sequence, each individual item in the sequence defines a rule to be applied by
|
The `watch` attribute defines a list of rules that control automatic service updates based on local file changes. `watch` is a sequence, each individual item in the sequence defines a rule to be applied by
|
||||||
Compose to monitor source code for changes. For more information, see [Use Compose Watch](/manuals/compose/file-watch.md).
|
Compose to monitor source code for changes. For more information, see [Use Compose Watch](/manuals/compose/how-tos/file-watch.md).
|
||||||
|
|
||||||
#### action
|
#### action
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ aliases:
|
||||||
weight: 110
|
weight: 110
|
||||||
---
|
---
|
||||||
|
|
||||||
{{< introduced compose 2.20.0 "/manuals/compose/release-notes.md#2200" >}}
|
{{< introduced compose 2.20.0 "/manuals/compose/releases/release-notes.md#2200" >}}
|
||||||
|
|
||||||
A Compose application can declare dependency on another Compose application. This is useful if:
|
A Compose application can declare dependency on another Compose application. This is useful if:
|
||||||
- You want to reuse other Compose files.
|
- You want to reuse other Compose files.
|
||||||
|
@ -119,4 +119,4 @@ override values for customization.
|
||||||
|
|
||||||
## Additional resources
|
## Additional resources
|
||||||
|
|
||||||
For more information on using `include`, see [Working with multiple Compose files](/manuals/compose/multiple-compose-files/_index.md)
|
For more information on using `include`, see [Working with multiple Compose files](/manuals/compose/how-tos/multiple-compose-files/_index.md)
|
||||||
|
|
|
@ -182,7 +182,7 @@ services:
|
||||||
|
|
||||||
### Replace value
|
### Replace value
|
||||||
|
|
||||||
{{< introduced compose 2.24.4 "/manuals/compose/release-notes.md#2244" >}}
|
{{< introduced compose 2.24.4 "/manuals/compose/releases/release-notes.md#2244" >}}
|
||||||
|
|
||||||
While `!reset` can be used to remove a declaration from a Compose file using an override file, `!override` allows you
|
While `!reset` can be used to remove a declaration from a Compose file using an override file, `!override` allows you
|
||||||
to fully replace an attribute, bypassing the standard merge rules. A typical example is to fully replace a resource definition, to rely on a distinct model but using the same name.
|
to fully replace an attribute, bypassing the standard merge rules. A typical example is to fully replace a resource definition, to rely on a distinct model but using the same name.
|
||||||
|
@ -220,5 +220,5 @@ If `!override` had not been used, both `8080:80` and `8443:443` would be exposed
|
||||||
|
|
||||||
## Additional resources
|
## Additional resources
|
||||||
|
|
||||||
For more information on how merge can be used to create a composite Compose file, see [Working with multiple Compose files](/manuals/compose/multiple-compose-files/_index.md)
|
For more information on how merge can be used to create a composite Compose file, see [Working with multiple Compose files](/manuals/compose/how-tos/multiple-compose-files/_index.md)
|
||||||
|
|
||||||
|
|
|
@ -221,4 +221,4 @@ networks:
|
||||||
|
|
||||||
## Additional resources
|
## Additional resources
|
||||||
|
|
||||||
For more examples, see [Networking in Compose](/manuals/compose/networking.md).
|
For more examples, see [Networking in Compose](/manuals/compose/how-tos/networking.md).
|
||||||
|
|
|
@ -68,4 +68,4 @@ In the above example:
|
||||||
profile `debug` is automatically enabled and service `test_lib` is pulled in as a dependency starting both
|
profile `debug` is automatically enabled and service `test_lib` is pulled in as a dependency starting both
|
||||||
services `debug_lib` and `test_lib`.
|
services `debug_lib` and `test_lib`.
|
||||||
|
|
||||||
See how you can use `profiles` in [Docker Compose](/manuals/compose/profiles.md).
|
See how you can use `profiles` in [Docker Compose](/manuals/compose/how-tos/profiles.md).
|
||||||
|
|
|
@ -41,4 +41,4 @@ secrets:
|
||||||
|
|
||||||
## Additional resources
|
## Additional resources
|
||||||
|
|
||||||
For more information, see [How to use secrets in Compose](/manuals/compose/use-secrets.md).
|
For more information, see [How to use secrets in Compose](/manuals/compose/how-tos/use-secrets.md).
|
||||||
|
|
|
@ -89,7 +89,7 @@ annotations:
|
||||||
|
|
||||||
### attach
|
### attach
|
||||||
|
|
||||||
{{< introduced compose 2.20.0 "/manuals/compose/release-notes.md#2200" >}}
|
{{< introduced compose 2.20.0 "/manuals/compose/releases/release-notes.md#2200" >}}
|
||||||
|
|
||||||
When `attach` is defined and set to `false` Compose does not collect service logs,
|
When `attach` is defined and set to `false` Compose does not collect service logs,
|
||||||
until you explicitly request it to.
|
until you explicitly request it to.
|
||||||
|
@ -231,7 +231,7 @@ cap_drop:
|
||||||
|
|
||||||
### cgroup
|
### cgroup
|
||||||
|
|
||||||
{{< introduced compose 2.15.0 "/manuals/compose/release-notes.md#2150" >}}
|
{{< introduced compose 2.15.0 "/manuals/compose/releases/release-notes.md#2150" >}}
|
||||||
|
|
||||||
`cgroup` specifies the cgroup namespace to join. When unset, it is the container runtime's decision to
|
`cgroup` specifies the cgroup namespace to join. When unset, it is the container runtime's decision to
|
||||||
select which cgroup namespace to use, if supported.
|
select which cgroup namespace to use, if supported.
|
||||||
|
@ -439,7 +439,7 @@ expressed in the short form.
|
||||||
|
|
||||||
- `restart`: When set to `true` Compose restarts this service after it updates the dependency service.
|
- `restart`: When set to `true` Compose restarts this service after it updates the dependency service.
|
||||||
This applies to an explicit restart controlled by a Compose operation, and excludes automated restart by the container runtime
|
This applies to an explicit restart controlled by a Compose operation, and excludes automated restart by the container runtime
|
||||||
after the container dies. Introduced in Docker Compose version [2.17.0](/manuals/compose/release-notes.md#2170).
|
after the container dies. Introduced in Docker Compose version [2.17.0](/manuals/compose/releases/release-notes.md#2170).
|
||||||
|
|
||||||
- `condition`: Sets the condition under which dependency is considered satisfied
|
- `condition`: Sets the condition under which dependency is considered satisfied
|
||||||
- `service_started`: An equivalent of the short syntax described above
|
- `service_started`: An equivalent of the short syntax described above
|
||||||
|
@ -449,7 +449,7 @@ expressed in the short form.
|
||||||
- `service_completed_successfully`: Specifies that a dependency is expected to run
|
- `service_completed_successfully`: Specifies that a dependency is expected to run
|
||||||
to successful completion before starting a dependent service.
|
to successful completion before starting a dependent service.
|
||||||
- `required`: When set to `false` Compose only warns you when the dependency service isn't started or available. If it's not defined
|
- `required`: When set to `false` Compose only warns you when the dependency service isn't started or available. If it's not defined
|
||||||
the default value of `required` is `true`. Introduced in Docker Compose version [2.20.0](/manuals/compose/release-notes.md#2200).
|
the default value of `required` is `true`. Introduced in Docker Compose version [2.20.0](/manuals/compose/releases/release-notes.md#2200).
|
||||||
|
|
||||||
Service dependencies cause the following behaviors:
|
Service dependencies cause the following behaviors:
|
||||||
|
|
||||||
|
@ -490,7 +490,7 @@ Compose guarantees dependency services marked with
|
||||||
|
|
||||||
### develop
|
### develop
|
||||||
|
|
||||||
{{< introduced compose 2.22.0 "/manuals/compose/release-notes.md#2220" >}}
|
{{< introduced compose 2.22.0 "/manuals/compose/releases/release-notes.md#2220" >}}
|
||||||
|
|
||||||
`develop` specifies the development configuration for maintaining a container in sync with source, as defined in the [Development Section](develop.md).
|
`develop` specifies the development configuration for maintaining a container in sync with source, as defined in the [Development Section](develop.md).
|
||||||
|
|
||||||
|
@ -561,7 +561,7 @@ dns_search:
|
||||||
|
|
||||||
### driver_opts
|
### driver_opts
|
||||||
|
|
||||||
{{< introduced compose 2.27.1 "/manuals/compose/release-notes.md#2271" >}}
|
{{< introduced compose 2.27.1 "/manuals/compose/releases/release-notes.md#2271" >}}
|
||||||
|
|
||||||
`driver_opts` specifies a list of options as key-value pairs to pass to the driver. These options are
|
`driver_opts` specifies a list of options as key-value pairs to pass to the driver. These options are
|
||||||
driver-dependent.
|
driver-dependent.
|
||||||
|
@ -954,7 +954,7 @@ extra_hosts:
|
||||||
- "myhostv6=[::1]"
|
- "myhostv6=[::1]"
|
||||||
```
|
```
|
||||||
|
|
||||||
The separator `=` is preferred, but `:` can also be used. Introduced in Docker Compose version [2.24.1](/manuals/compose/release-notes.md#2241). For example:
|
The separator `=` is preferred, but `:` can also be used. Introduced in Docker Compose version [2.24.1](/manuals/compose/releases/release-notes.md#2241). For example:
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
|
@ -1017,7 +1017,7 @@ healthcheck:
|
||||||
start_interval: 5s
|
start_interval: 5s
|
||||||
```
|
```
|
||||||
|
|
||||||
`interval`, `timeout`, `start_period`, and `start_interval` are [specified as durations](extension.md#specifying-durations). Introduced in Docker Compose version [2.20.2](/manuals/compose/release-notes.md#2202)
|
`interval`, `timeout`, `start_period`, and `start_interval` are [specified as durations](extension.md#specifying-durations). Introduced in Docker Compose version [2.20.2](/manuals/compose/releases/release-notes.md#2202)
|
||||||
|
|
||||||
`test` defines the command Compose runs to check container health. It can be
|
`test` defines the command Compose runs to check container health. It can be
|
||||||
either a string or a list. If it's a list, the first item must be either `NONE`, `CMD` or `CMD-SHELL`.
|
either a string or a list. If it's a list, the first item must be either `NONE`, `CMD` or `CMD-SHELL`.
|
||||||
|
@ -1352,7 +1352,7 @@ networks:
|
||||||
|
|
||||||
#### mac_address
|
#### mac_address
|
||||||
|
|
||||||
{{< introduced compose 2.23.2 "/manuals/compose/release-notes.md#2232" >}}
|
{{< introduced compose 2.23.2 "/manuals/compose/releases/release-notes.md#2232" >}}
|
||||||
|
|
||||||
`mac_address` sets the MAC address used by the service container when connecting to this particular network.
|
`mac_address` sets the MAC address used by the service container when connecting to this particular network.
|
||||||
|
|
||||||
|
@ -1479,7 +1479,7 @@ expressed in the short form.
|
||||||
- `published`: The publicly exposed port. It is defined as a string and can be set as a range using syntax `start-end`. It means the actual port is assigned a remaining available port, within the set range.
|
- `published`: The publicly exposed port. It is defined as a string and can be set as a range using syntax `start-end`. It means the actual port is assigned a remaining available port, within the set range.
|
||||||
- `host_ip`: The Host IP mapping, unspecified means all network interfaces (`0.0.0.0`).
|
- `host_ip`: The Host IP mapping, unspecified means all network interfaces (`0.0.0.0`).
|
||||||
- `protocol`: The port protocol (`tcp` or `udp`). Defaults to `tcp`.
|
- `protocol`: The port protocol (`tcp` or `udp`). Defaults to `tcp`.
|
||||||
- `app_protocol`: The application protocol (TCP/IP level 4 / OSI level 7) this port is used for. This is optional and can be used as a hint for Compose to offer richer behavior for protocols that it understands. Introduced in Docker Compose version [2.26.0](/manuals/compose/release-notes.md#2260).
|
- `app_protocol`: The application protocol (TCP/IP level 4 / OSI level 7) this port is used for. This is optional and can be used as a hint for Compose to offer richer behavior for protocols that it understands. Introduced in Docker Compose version [2.26.0](/manuals/compose/releases/release-notes.md#2260).
|
||||||
- `mode`: `host`: For publishing a host port on each node, or `ingress` for a port to be load balanced. Defaults to `ingress`.
|
- `mode`: `host`: For publishing a host port on each node, or `ingress` for a port to be load balanced. Defaults to `ingress`.
|
||||||
- `name`: A human-readable name for the port, used to document it's usage within the service.
|
- `name`: A human-readable name for the port, used to document it's usage within the service.
|
||||||
|
|
||||||
|
@ -1780,7 +1780,7 @@ userns_mode: "host"
|
||||||
|
|
||||||
### uts
|
### uts
|
||||||
|
|
||||||
{{< introduced compose 2.15.1 "/manuals/compose/release-notes.md#2151" >}}
|
{{< introduced compose 2.15.1 "/manuals/compose/releases/release-notes.md#2151" >}}
|
||||||
|
|
||||||
`uts` configures the UTS namespace mode set for the service container. When unspecified
|
`uts` configures the UTS namespace mode set for the service container. When unspecified
|
||||||
it is the runtime's decision to assign a UTS namespace, if supported. Available values are:
|
it is the runtime's decision to assign a UTS namespace, if supported. Available values are:
|
||||||
|
@ -1865,7 +1865,7 @@ expressed in the short form.
|
||||||
- `subpath`: Path inside a volume to mount instead of the volume root.
|
- `subpath`: Path inside a volume to mount instead of the volume root.
|
||||||
- `tmpfs`: Configures additional tmpfs options:
|
- `tmpfs`: Configures additional tmpfs options:
|
||||||
- `size`: The size for the tmpfs mount in bytes (either numeric or as bytes unit).
|
- `size`: The size for the tmpfs mount in bytes (either numeric or as bytes unit).
|
||||||
- `mode`: The file mode for the tmpfs mount as Unix permission bits as an octal number. Introduced in Docker Compose version [2.14.0](/manuals/compose/release-notes.md#2260).
|
- `mode`: The file mode for the tmpfs mount as Unix permission bits as an octal number. Introduced in Docker Compose version [2.14.0](/manuals/compose/releases/release-notes.md#2260).
|
||||||
- `consistency`: The consistency requirements of the mount. Available values are platform specific.
|
- `consistency`: The consistency requirements of the mount. Available values are platform specific.
|
||||||
|
|
||||||
> [!TIP]
|
> [!TIP]
|
||||||
|
|
|
@ -35,4 +35,4 @@ services:
|
||||||
command: echo "I'm running ${COMPOSE_PROJECT_NAME}"
|
command: echo "I'm running ${COMPOSE_PROJECT_NAME}"
|
||||||
```
|
```
|
||||||
|
|
||||||
For more information on other ways to name Compose projects, see [Specify a project name](/manuals/compose/project-name.md).
|
For more information on other ways to name Compose projects, see [Specify a project name](/manuals/compose/how-tos/project-name.md).
|
||||||
|
|
|
@ -37,7 +37,7 @@ long: |-
|
||||||
|
|
||||||
* [.dockerignore](/reference/dockerfile.md#dockerignore-file)
|
* [.dockerignore](/reference/dockerfile.md#dockerignore-file)
|
||||||
* [Dockerfile](/reference/dockerfile.md)
|
* [Dockerfile](/reference/dockerfile.md)
|
||||||
* [compose.yaml](/manuals/compose/compose-application-model.md)
|
* [compose.yaml](/manuals/compose/intro/compose-application-model.md)
|
||||||
|
|
||||||
usage: docker init [OPTIONS]
|
usage: docker init [OPTIONS]
|
||||||
pname: docker
|
pname: docker
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
- /go/credential-store/
|
- /go/credential-store/
|
||||||
"/cloud/ecs-integration/":
|
"/cloud/ecs-integration/":
|
||||||
- /go/compose-ecs-eol/
|
- /go/compose-ecs-eol/
|
||||||
"/compose/migrate/":
|
"/compose/releases/migrate/":
|
||||||
- /go/compose-v1-eol/
|
- /go/compose-v1-eol/
|
||||||
"/engine/cli/formatting/":
|
"/engine/cli/formatting/":
|
||||||
# Instructions on using Go templates to format CLI output with --format
|
# Instructions on using Go templates to format CLI output with --format
|
||||||
|
|
Loading…
Reference in New Issue