From c7ecadc9279e7c34340198d284247cc5335167fd Mon Sep 17 00:00:00 2001 From: Guillaume Lours <705411+glours@users.noreply.github.com> Date: Tue, 29 Oct 2024 17:59:10 +0100 Subject: [PATCH] release-notes for Compose v2.29.7 and v2.30.0 versions Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com> --- .../compose/v2/docs/reference/compose.md | 155 +--------- .../docs/reference/compose_alpha_generate.md | 17 + .../compose/v2/docs/reference/compose_cp.md | 1 + .../v2/docs/reference/compose_export.md | 16 + .../compose/v2/docs/reference/compose_wait.md | 2 +- .../v2/docs/reference/docker_compose.yaml | 290 +++++++++--------- .../docs/reference/docker_compose_alpha.yaml | 2 + .../docker_compose_alpha_generate.yaml | 53 ++++ .../docker_compose_alpha_publish.yaml | 2 +- .../v2/docs/reference/docker_compose_cp.yaml | 6 +- .../docs/reference/docker_compose_export.yaml | 45 +++ .../docs/reference/docker_compose_wait.yaml | 4 +- _vendor/modules.txt | 4 +- .../manuals/compose/releases/release-notes.md | 26 ++ go.mod | 6 +- go.sum | 2 + hugo.yaml | 2 +- 17 files changed, 327 insertions(+), 306 deletions(-) create mode 100644 _vendor/github.com/docker/compose/v2/docs/reference/compose_alpha_generate.md create mode 100644 _vendor/github.com/docker/compose/v2/docs/reference/compose_export.md create mode 100644 _vendor/github.com/docker/compose/v2/docs/reference/docker_compose_alpha_generate.yaml create mode 100644 _vendor/github.com/docker/compose/v2/docs/reference/docker_compose_export.yaml diff --git a/_vendor/github.com/docker/compose/v2/docs/reference/compose.md b/_vendor/github.com/docker/compose/v2/docs/reference/compose.md index 26a216e0218d..5a69a01b508f 100644 --- a/_vendor/github.com/docker/compose/v2/docs/reference/compose.md +++ b/_vendor/github.com/docker/compose/v2/docs/reference/compose.md @@ -1,150 +1,11 @@ # docker compose - -You can use the compose subcommand, `docker compose [-f ...] [options] [COMMAND] [ARGS...]`, to build and manage -multiple services in Docker containers. - -### Use `-f` to specify the name and path of one or more Compose files -Use the `-f` flag to specify the location of a Compose configuration file. - -#### Specifying multiple Compose files -You can supply multiple `-f` configuration files. When you supply multiple files, Compose combines them into a single -configuration. Compose builds the configuration in the order you supply the files. Subsequent files override and add -to their predecessors. - -For example, consider this command line: - -```console -$ docker compose -f docker-compose.yml -f docker-compose.admin.yml run backup_db -``` - -The `docker-compose.yml` file might specify a `webapp` service. - -```yaml -services: - webapp: - image: examples/web - ports: - - "8000:8000" - volumes: - - "/data" -``` -If the `docker-compose.admin.yml` also specifies this same service, any matching fields override the previous file. -New values, add to the `webapp` service configuration. - -```yaml -services: - webapp: - build: . - environment: - - DEBUG=1 +```text +docker compose [-f ...] [options] [COMMAND] [ARGS...] ``` -When you use multiple Compose files, all paths in the files are relative to the first configuration file specified -with `-f`. You can use the `--project-directory` option to override this base path. - -Use a `-f` with `-` (dash) as the filename to read the configuration from stdin. When stdin is used all paths in the -configuration are relative to the current working directory. - -The `-f` flag is optional. If you don’t provide this flag on the command line, Compose traverses the working directory -and its parent directories looking for a `compose.yaml` or `docker-compose.yaml` file. - -#### Specifying a path to a single Compose file -You can use the `-f` flag to specify a path to a Compose file that is not located in the current directory, either -from the command line or by setting up a `COMPOSE_FILE` environment variable in your shell or in an environment file. - -For an example of using the `-f` option at the command line, suppose you are running the Compose Rails sample, and -have a `compose.yaml` file in a directory called `sandbox/rails`. You can use a command like `docker compose pull` to -get the postgres image for the db service from anywhere by using the `-f` flag as follows: - -```console -$ docker compose -f ~/sandbox/rails/compose.yaml pull db -``` - -### Use `-p` to specify a project name - -Each configuration has a project name. Compose sets the project name using -the following mechanisms, in order of precedence: -- The `-p` command line flag -- The `COMPOSE_PROJECT_NAME` environment variable -- The top level `name:` variable from the config file (or the last `name:` -from a series of config files specified using `-f`) -- The `basename` of the project directory containing the config file (or -containing the first config file specified using `-f`) -- The `basename` of the current directory if no config file is specified -Project names must contain only lowercase letters, decimal digits, dashes, -and underscores, and must begin with a lowercase letter or decimal digit. If -the `basename` of the project directory or current directory violates this -constraint, you must use one of the other mechanisms. - -```console -$ docker compose -p my_project ps -a -NAME SERVICE STATUS PORTS -my_project_demo_1 demo running - -$ docker compose -p my_project logs -demo_1 | PING localhost (127.0.0.1): 56 data bytes -demo_1 | 64 bytes from 127.0.0.1: seq=0 ttl=64 time=0.095 ms -``` - -### Use profiles to enable optional services - -Use `--profile` to specify one or more active profiles -Calling `docker compose --profile frontend up` starts the services with the profile `frontend` and services -without any specified profiles. -You can also enable multiple profiles, e.g. with `docker compose --profile frontend --profile debug up` the profiles `frontend` and `debug` is enabled. - -Profiles can also be set by `COMPOSE_PROFILES` environment variable. - -### Configuring parallelism - -Use `--parallel` to specify the maximum level of parallelism for concurrent engine calls. -Calling `docker compose --parallel 1 pull` pulls the pullable images defined in the Compose file -one at a time. This can also be used to control build concurrency. - -Parallelism can also be set by the `COMPOSE_PARALLEL_LIMIT` environment variable. - -### Set up environment variables - -You can set environment variables for various docker compose options, including the `-f`, `-p` and `--profiles` flags. - -Setting the `COMPOSE_FILE` environment variable is equivalent to passing the `-f` flag, -`COMPOSE_PROJECT_NAME` environment variable does the same as the `-p` flag, -`COMPOSE_PROFILES` environment variable is equivalent to the `--profiles` flag -and `COMPOSE_PARALLEL_LIMIT` does the same as the `--parallel` flag. - -If flags are explicitly set on the command line, the associated environment variable is ignored. - -Setting the `COMPOSE_IGNORE_ORPHANS` environment variable to `true` stops docker compose from detecting orphaned -containers for the project. - -Setting the `COMPOSE_MENU` environment variable to `false` disables the helper menu when running `docker compose up` -in attached mode. Alternatively, you can also run `docker compose up --menu=false` to disable the helper menu. - -### Use Dry Run mode to test your command - -Use `--dry-run` flag to test a command without changing your application stack state. -Dry Run mode shows you all the steps Compose applies when executing a command, for example: -```console -$ docker compose --dry-run up --build -d -[+] Pulling 1/1 - ✔ DRY-RUN MODE - db Pulled 0.9s -[+] Running 10/8 - ✔ DRY-RUN MODE - build service backend 0.0s - ✔ DRY-RUN MODE - ==> ==> writing image dryRun-754a08ddf8bcb1cf22f310f09206dd783d42f7dd 0.0s - ✔ DRY-RUN MODE - ==> ==> naming to nginx-golang-mysql-backend 0.0s - ✔ DRY-RUN MODE - Network nginx-golang-mysql_default Created 0.0s - ✔ DRY-RUN MODE - Container nginx-golang-mysql-db-1 Created 0.0s - ✔ DRY-RUN MODE - Container nginx-golang-mysql-backend-1 Created 0.0s - ✔ DRY-RUN MODE - Container nginx-golang-mysql-proxy-1 Created 0.0s - ✔ DRY-RUN MODE - Container nginx-golang-mysql-db-1 Healthy 0.5s - ✔ DRY-RUN MODE - Container nginx-golang-mysql-backend-1 Started 0.0s - ✔ DRY-RUN MODE - Container nginx-golang-mysql-proxy-1 Started Started -``` -From the example above, you can see that the first step is to pull the image defined by `db` service, then build the `backend` service. -Next, the containers are created. The `db` service is started, and the `backend` and `proxy` wait until the `db` service is healthy before starting. - -Dry Run mode works with almost all commands. You cannot use Dry Run mode with a command that doesn't change the state of a Compose stack such as `ps`, `ls`, `logs` for example. + +Define and run multi-container applications with Docker ### Subcommands @@ -158,6 +19,7 @@ Dry Run mode works with almost all commands. You cannot use Dry Run mode with a | [`down`](compose_down.md) | Stop and remove containers, networks | | [`events`](compose_events.md) | Receive real time events from containers | | [`exec`](compose_exec.md) | Execute a command in a running container | +| [`export`](compose_export.md) | Export a service container's filesystem as a tar archive | | [`images`](compose_images.md) | List images used by the created containers | | [`kill`](compose_kill.md) | Force stop service containers | | [`logs`](compose_logs.md) | View output from containers | @@ -178,7 +40,7 @@ Dry Run mode works with almost all commands. You cannot use Dry Run mode with a | [`unpause`](compose_unpause.md) | Unpause services | | [`up`](compose_up.md) | Create and start containers | | [`version`](compose_version.md) | Show the Docker Compose version information | -| [`wait`](compose_wait.md) | Block until the first service container stops | +| [`wait`](compose_wait.md) | Block until containers of all (or specified) services stop. | | [`watch`](compose_watch.md) | Watch build context for service and rebuild/refresh containers when files are updated | @@ -201,10 +63,7 @@ Dry Run mode works with almost all commands. You cannot use Dry Run mode with a -## Description - -You can use the compose subcommand, `docker compose [-f ...] [options] [COMMAND] [ARGS...]`, to build and manage -multiple services in Docker containers. +## Examples ### Use `-f` to specify the name and path of one or more Compose files Use the `-f` flag to specify the location of a Compose configuration file. diff --git a/_vendor/github.com/docker/compose/v2/docs/reference/compose_alpha_generate.md b/_vendor/github.com/docker/compose/v2/docs/reference/compose_alpha_generate.md new file mode 100644 index 000000000000..f4054627798c --- /dev/null +++ b/_vendor/github.com/docker/compose/v2/docs/reference/compose_alpha_generate.md @@ -0,0 +1,17 @@ +# docker compose alpha generate + + +EXPERIMENTAL - Generate a Compose file from existing containers + +### Options + +| Name | Type | Default | Description | +|:----------------|:---------|:--------|:------------------------------------------| +| `--dry-run` | `bool` | | Execute command in dry run mode | +| `--format` | `string` | `yaml` | Format the output. Values: [yaml \| json] | +| `--name` | `string` | | Project name to set in the Compose file | +| `--project-dir` | `string` | | Directory to use for the project | + + + + diff --git a/_vendor/github.com/docker/compose/v2/docs/reference/compose_cp.md b/_vendor/github.com/docker/compose/v2/docs/reference/compose_cp.md index 9ed14140eab0..0886bbd9f941 100644 --- a/_vendor/github.com/docker/compose/v2/docs/reference/compose_cp.md +++ b/_vendor/github.com/docker/compose/v2/docs/reference/compose_cp.md @@ -7,6 +7,7 @@ Copy files/folders between a service container and the local filesystem | Name | Type | Default | Description | |:----------------------|:-------|:--------|:--------------------------------------------------------| +| `--all` | `bool` | | Include containers created by the run command | | `-a`, `--archive` | `bool` | | Archive mode (copy all uid/gid information) | | `--dry-run` | `bool` | | Execute command in dry run mode | | `-L`, `--follow-link` | `bool` | | Always follow symbol link in SRC_PATH | diff --git a/_vendor/github.com/docker/compose/v2/docs/reference/compose_export.md b/_vendor/github.com/docker/compose/v2/docs/reference/compose_export.md new file mode 100644 index 000000000000..942ea6a347f3 --- /dev/null +++ b/_vendor/github.com/docker/compose/v2/docs/reference/compose_export.md @@ -0,0 +1,16 @@ +# docker compose export + + +Export a service container's filesystem as a tar archive + +### Options + +| Name | Type | Default | Description | +|:-----------------|:---------|:--------|:---------------------------------------------------------| +| `--dry-run` | `bool` | | Execute command in dry run mode | +| `--index` | `int` | `0` | index of the container if service has multiple replicas. | +| `-o`, `--output` | `string` | | Write to a file, instead of STDOUT | + + + + diff --git a/_vendor/github.com/docker/compose/v2/docs/reference/compose_wait.md b/_vendor/github.com/docker/compose/v2/docs/reference/compose_wait.md index cc62d5967b8a..59474c9b5090 100644 --- a/_vendor/github.com/docker/compose/v2/docs/reference/compose_wait.md +++ b/_vendor/github.com/docker/compose/v2/docs/reference/compose_wait.md @@ -1,7 +1,7 @@ # docker compose wait -Block until the first service container stops +Block until containers of all (or specified) services stop. ### Options diff --git a/_vendor/github.com/docker/compose/v2/docs/reference/docker_compose.yaml b/_vendor/github.com/docker/compose/v2/docs/reference/docker_compose.yaml index 82c7cd184476..f59ec4a04b2c 100644 --- a/_vendor/github.com/docker/compose/v2/docs/reference/docker_compose.yaml +++ b/_vendor/github.com/docker/compose/v2/docs/reference/docker_compose.yaml @@ -1,150 +1,6 @@ command: docker compose short: Docker Compose -long: |- - You can use the compose subcommand, `docker compose [-f ...] [options] [COMMAND] [ARGS...]`, to build and manage - multiple services in Docker containers. - - ### Use `-f` to specify the name and path of one or more Compose files - Use the `-f` flag to specify the location of a Compose configuration file. - - #### Specifying multiple Compose files - You can supply multiple `-f` configuration files. When you supply multiple files, Compose combines them into a single - configuration. Compose builds the configuration in the order you supply the files. Subsequent files override and add - to their predecessors. - - For example, consider this command line: - - ```console - $ docker compose -f docker-compose.yml -f docker-compose.admin.yml run backup_db - ``` - - The `docker-compose.yml` file might specify a `webapp` service. - - ```yaml - services: - webapp: - image: examples/web - ports: - - "8000:8000" - volumes: - - "/data" - ``` - If the `docker-compose.admin.yml` also specifies this same service, any matching fields override the previous file. - New values, add to the `webapp` service configuration. - - ```yaml - services: - webapp: - build: . - environment: - - DEBUG=1 - ``` - - When you use multiple Compose files, all paths in the files are relative to the first configuration file specified - with `-f`. You can use the `--project-directory` option to override this base path. - - Use a `-f` with `-` (dash) as the filename to read the configuration from stdin. When stdin is used all paths in the - configuration are relative to the current working directory. - - The `-f` flag is optional. If you don’t provide this flag on the command line, Compose traverses the working directory - and its parent directories looking for a `compose.yaml` or `docker-compose.yaml` file. - - #### Specifying a path to a single Compose file - You can use the `-f` flag to specify a path to a Compose file that is not located in the current directory, either - from the command line or by setting up a `COMPOSE_FILE` environment variable in your shell or in an environment file. - - For an example of using the `-f` option at the command line, suppose you are running the Compose Rails sample, and - have a `compose.yaml` file in a directory called `sandbox/rails`. You can use a command like `docker compose pull` to - get the postgres image for the db service from anywhere by using the `-f` flag as follows: - - ```console - $ docker compose -f ~/sandbox/rails/compose.yaml pull db - ``` - - ### Use `-p` to specify a project name - - Each configuration has a project name. Compose sets the project name using - the following mechanisms, in order of precedence: - - The `-p` command line flag - - The `COMPOSE_PROJECT_NAME` environment variable - - The top level `name:` variable from the config file (or the last `name:` - from a series of config files specified using `-f`) - - The `basename` of the project directory containing the config file (or - containing the first config file specified using `-f`) - - The `basename` of the current directory if no config file is specified - Project names must contain only lowercase letters, decimal digits, dashes, - and underscores, and must begin with a lowercase letter or decimal digit. If - the `basename` of the project directory or current directory violates this - constraint, you must use one of the other mechanisms. - - ```console - $ docker compose -p my_project ps -a - NAME SERVICE STATUS PORTS - my_project_demo_1 demo running - - $ docker compose -p my_project logs - demo_1 | PING localhost (127.0.0.1): 56 data bytes - demo_1 | 64 bytes from 127.0.0.1: seq=0 ttl=64 time=0.095 ms - ``` - - ### Use profiles to enable optional services - - Use `--profile` to specify one or more active profiles - Calling `docker compose --profile frontend up` starts the services with the profile `frontend` and services - without any specified profiles. - You can also enable multiple profiles, e.g. with `docker compose --profile frontend --profile debug up` the profiles `frontend` and `debug` is enabled. - - Profiles can also be set by `COMPOSE_PROFILES` environment variable. - - ### Configuring parallelism - - Use `--parallel` to specify the maximum level of parallelism for concurrent engine calls. - Calling `docker compose --parallel 1 pull` pulls the pullable images defined in the Compose file - one at a time. This can also be used to control build concurrency. - - Parallelism can also be set by the `COMPOSE_PARALLEL_LIMIT` environment variable. - - ### Set up environment variables - - You can set environment variables for various docker compose options, including the `-f`, `-p` and `--profiles` flags. - - Setting the `COMPOSE_FILE` environment variable is equivalent to passing the `-f` flag, - `COMPOSE_PROJECT_NAME` environment variable does the same as the `-p` flag, - `COMPOSE_PROFILES` environment variable is equivalent to the `--profiles` flag - and `COMPOSE_PARALLEL_LIMIT` does the same as the `--parallel` flag. - - If flags are explicitly set on the command line, the associated environment variable is ignored. - - Setting the `COMPOSE_IGNORE_ORPHANS` environment variable to `true` stops docker compose from detecting orphaned - containers for the project. - - Setting the `COMPOSE_MENU` environment variable to `false` disables the helper menu when running `docker compose up` - in attached mode. Alternatively, you can also run `docker compose up --menu=false` to disable the helper menu. - - ### Use Dry Run mode to test your command - - Use `--dry-run` flag to test a command without changing your application stack state. - Dry Run mode shows you all the steps Compose applies when executing a command, for example: - ```console - $ docker compose --dry-run up --build -d - [+] Pulling 1/1 - ✔ DRY-RUN MODE - db Pulled 0.9s - [+] Running 10/8 - ✔ DRY-RUN MODE - build service backend 0.0s - ✔ DRY-RUN MODE - ==> ==> writing image dryRun-754a08ddf8bcb1cf22f310f09206dd783d42f7dd 0.0s - ✔ DRY-RUN MODE - ==> ==> naming to nginx-golang-mysql-backend 0.0s - ✔ DRY-RUN MODE - Network nginx-golang-mysql_default Created 0.0s - ✔ DRY-RUN MODE - Container nginx-golang-mysql-db-1 Created 0.0s - ✔ DRY-RUN MODE - Container nginx-golang-mysql-backend-1 Created 0.0s - ✔ DRY-RUN MODE - Container nginx-golang-mysql-proxy-1 Created 0.0s - ✔ DRY-RUN MODE - Container nginx-golang-mysql-db-1 Healthy 0.5s - ✔ DRY-RUN MODE - Container nginx-golang-mysql-backend-1 Started 0.0s - ✔ DRY-RUN MODE - Container nginx-golang-mysql-proxy-1 Started Started - ``` - From the example above, you can see that the first step is to pull the image defined by `db` service, then build the `backend` service. - Next, the containers are created. The `db` service is started, and the `backend` and `proxy` wait until the `db` service is healthy before starting. - - Dry Run mode works with almost all commands. You cannot use Dry Run mode with a command that doesn't change the state of a Compose stack such as `ps`, `ls`, `logs` for example. +long: Define and run multi-container applications with Docker usage: docker compose pname: docker plink: docker.yaml @@ -157,6 +13,7 @@ cname: - docker compose down - docker compose events - docker compose exec + - docker compose export - docker compose images - docker compose kill - docker compose logs @@ -188,6 +45,7 @@ clink: - docker_compose_down.yaml - docker_compose_events.yaml - docker_compose_exec.yaml + - docker_compose_export.yaml - docker_compose_images.yaml - docker_compose_kill.yaml - docker_compose_logs.yaml @@ -367,6 +225,148 @@ options: experimentalcli: false kubernetes: false swarm: false +examples: |- + ### Use `-f` to specify the name and path of one or more Compose files + Use the `-f` flag to specify the location of a Compose configuration file. + + #### Specifying multiple Compose files + You can supply multiple `-f` configuration files. When you supply multiple files, Compose combines them into a single + configuration. Compose builds the configuration in the order you supply the files. Subsequent files override and add + to their predecessors. + + For example, consider this command line: + + ```console + $ docker compose -f docker-compose.yml -f docker-compose.admin.yml run backup_db + ``` + + The `docker-compose.yml` file might specify a `webapp` service. + + ```yaml + services: + webapp: + image: examples/web + ports: + - "8000:8000" + volumes: + - "/data" + ``` + If the `docker-compose.admin.yml` also specifies this same service, any matching fields override the previous file. + New values, add to the `webapp` service configuration. + + ```yaml + services: + webapp: + build: . + environment: + - DEBUG=1 + ``` + + When you use multiple Compose files, all paths in the files are relative to the first configuration file specified + with `-f`. You can use the `--project-directory` option to override this base path. + + Use a `-f` with `-` (dash) as the filename to read the configuration from stdin. When stdin is used all paths in the + configuration are relative to the current working directory. + + The `-f` flag is optional. If you don’t provide this flag on the command line, Compose traverses the working directory + and its parent directories looking for a `compose.yaml` or `docker-compose.yaml` file. + + #### Specifying a path to a single Compose file + You can use the `-f` flag to specify a path to a Compose file that is not located in the current directory, either + from the command line or by setting up a `COMPOSE_FILE` environment variable in your shell or in an environment file. + + For an example of using the `-f` option at the command line, suppose you are running the Compose Rails sample, and + have a `compose.yaml` file in a directory called `sandbox/rails`. You can use a command like `docker compose pull` to + get the postgres image for the db service from anywhere by using the `-f` flag as follows: + + ```console + $ docker compose -f ~/sandbox/rails/compose.yaml pull db + ``` + + ### Use `-p` to specify a project name + + Each configuration has a project name. Compose sets the project name using + the following mechanisms, in order of precedence: + - The `-p` command line flag + - The `COMPOSE_PROJECT_NAME` environment variable + - The top level `name:` variable from the config file (or the last `name:` + from a series of config files specified using `-f`) + - The `basename` of the project directory containing the config file (or + containing the first config file specified using `-f`) + - The `basename` of the current directory if no config file is specified + Project names must contain only lowercase letters, decimal digits, dashes, + and underscores, and must begin with a lowercase letter or decimal digit. If + the `basename` of the project directory or current directory violates this + constraint, you must use one of the other mechanisms. + + ```console + $ docker compose -p my_project ps -a + NAME SERVICE STATUS PORTS + my_project_demo_1 demo running + + $ docker compose -p my_project logs + demo_1 | PING localhost (127.0.0.1): 56 data bytes + demo_1 | 64 bytes from 127.0.0.1: seq=0 ttl=64 time=0.095 ms + ``` + + ### Use profiles to enable optional services + + Use `--profile` to specify one or more active profiles + Calling `docker compose --profile frontend up` starts the services with the profile `frontend` and services + without any specified profiles. + You can also enable multiple profiles, e.g. with `docker compose --profile frontend --profile debug up` the profiles `frontend` and `debug` is enabled. + + Profiles can also be set by `COMPOSE_PROFILES` environment variable. + + ### Configuring parallelism + + Use `--parallel` to specify the maximum level of parallelism for concurrent engine calls. + Calling `docker compose --parallel 1 pull` pulls the pullable images defined in the Compose file + one at a time. This can also be used to control build concurrency. + + Parallelism can also be set by the `COMPOSE_PARALLEL_LIMIT` environment variable. + + ### Set up environment variables + + You can set environment variables for various docker compose options, including the `-f`, `-p` and `--profiles` flags. + + Setting the `COMPOSE_FILE` environment variable is equivalent to passing the `-f` flag, + `COMPOSE_PROJECT_NAME` environment variable does the same as the `-p` flag, + `COMPOSE_PROFILES` environment variable is equivalent to the `--profiles` flag + and `COMPOSE_PARALLEL_LIMIT` does the same as the `--parallel` flag. + + If flags are explicitly set on the command line, the associated environment variable is ignored. + + Setting the `COMPOSE_IGNORE_ORPHANS` environment variable to `true` stops docker compose from detecting orphaned + containers for the project. + + Setting the `COMPOSE_MENU` environment variable to `false` disables the helper menu when running `docker compose up` + in attached mode. Alternatively, you can also run `docker compose up --menu=false` to disable the helper menu. + + ### Use Dry Run mode to test your command + + Use `--dry-run` flag to test a command without changing your application stack state. + Dry Run mode shows you all the steps Compose applies when executing a command, for example: + ```console + $ docker compose --dry-run up --build -d + [+] Pulling 1/1 + ✔ DRY-RUN MODE - db Pulled 0.9s + [+] Running 10/8 + ✔ DRY-RUN MODE - build service backend 0.0s + ✔ DRY-RUN MODE - ==> ==> writing image dryRun-754a08ddf8bcb1cf22f310f09206dd783d42f7dd 0.0s + ✔ DRY-RUN MODE - ==> ==> naming to nginx-golang-mysql-backend 0.0s + ✔ DRY-RUN MODE - Network nginx-golang-mysql_default Created 0.0s + ✔ DRY-RUN MODE - Container nginx-golang-mysql-db-1 Created 0.0s + ✔ DRY-RUN MODE - Container nginx-golang-mysql-backend-1 Created 0.0s + ✔ DRY-RUN MODE - Container nginx-golang-mysql-proxy-1 Created 0.0s + ✔ DRY-RUN MODE - Container nginx-golang-mysql-db-1 Healthy 0.5s + ✔ DRY-RUN MODE - Container nginx-golang-mysql-backend-1 Started 0.0s + ✔ DRY-RUN MODE - Container nginx-golang-mysql-proxy-1 Started Started + ``` + From the example above, you can see that the first step is to pull the image defined by `db` service, then build the `backend` service. + Next, the containers are created. The `db` service is started, and the `backend` and `proxy` wait until the `db` service is healthy before starting. + + Dry Run mode works with almost all commands. You cannot use Dry Run mode with a command that doesn't change the state of a Compose stack such as `ps`, `ls`, `logs` for example. deprecated: false hidden: false experimental: false diff --git a/_vendor/github.com/docker/compose/v2/docs/reference/docker_compose_alpha.yaml b/_vendor/github.com/docker/compose/v2/docs/reference/docker_compose_alpha.yaml index 807097a387e6..e6b6b6e6b6f7 100644 --- a/_vendor/github.com/docker/compose/v2/docs/reference/docker_compose_alpha.yaml +++ b/_vendor/github.com/docker/compose/v2/docs/reference/docker_compose_alpha.yaml @@ -4,9 +4,11 @@ long: Experimental commands pname: docker compose plink: docker_compose.yaml cname: + - docker compose alpha generate - docker compose alpha publish - docker compose alpha viz clink: + - docker_compose_alpha_generate.yaml - docker_compose_alpha_publish.yaml - docker_compose_alpha_viz.yaml inherited_options: diff --git a/_vendor/github.com/docker/compose/v2/docs/reference/docker_compose_alpha_generate.yaml b/_vendor/github.com/docker/compose/v2/docs/reference/docker_compose_alpha_generate.yaml new file mode 100644 index 000000000000..0932af080ecc --- /dev/null +++ b/_vendor/github.com/docker/compose/v2/docs/reference/docker_compose_alpha_generate.yaml @@ -0,0 +1,53 @@ +command: docker compose alpha generate +short: EXPERIMENTAL - Generate a Compose file from existing containers +long: EXPERIMENTAL - Generate a Compose file from existing containers +usage: docker compose alpha generate [OPTIONS] [CONTAINERS...] +pname: docker compose alpha +plink: docker_compose_alpha.yaml +options: + - option: format + value_type: string + default_value: yaml + description: 'Format the output. Values: [yaml | json]' + deprecated: false + hidden: false + experimental: false + experimentalcli: false + kubernetes: false + swarm: false + - option: name + value_type: string + description: Project name to set in the Compose file + deprecated: false + hidden: false + experimental: false + experimentalcli: false + kubernetes: false + swarm: false + - option: project-dir + value_type: string + description: Directory to use for the project + deprecated: false + hidden: false + experimental: false + experimentalcli: false + kubernetes: false + swarm: false +inherited_options: + - option: dry-run + value_type: bool + default_value: "false" + description: Execute command in dry run mode + deprecated: false + hidden: false + experimental: false + experimentalcli: false + kubernetes: false + swarm: false +deprecated: false +hidden: false +experimental: false +experimentalcli: true +kubernetes: false +swarm: false + diff --git a/_vendor/github.com/docker/compose/v2/docs/reference/docker_compose_alpha_publish.yaml b/_vendor/github.com/docker/compose/v2/docs/reference/docker_compose_alpha_publish.yaml index 38868104a5f4..7a2da5ca92da 100644 --- a/_vendor/github.com/docker/compose/v2/docs/reference/docker_compose_alpha_publish.yaml +++ b/_vendor/github.com/docker/compose/v2/docs/reference/docker_compose_alpha_publish.yaml @@ -1,7 +1,7 @@ command: docker compose alpha publish short: Publish compose application long: Publish compose application -usage: docker compose alpha publish [OPTIONS] [REPOSITORY] +usage: docker compose alpha publish [OPTIONS] REPOSITORY[:TAG] pname: docker compose alpha plink: docker_compose_alpha.yaml options: diff --git a/_vendor/github.com/docker/compose/v2/docs/reference/docker_compose_cp.yaml b/_vendor/github.com/docker/compose/v2/docs/reference/docker_compose_cp.yaml index 8ff3cf37e034..24f6aec87f94 100644 --- a/_vendor/github.com/docker/compose/v2/docs/reference/docker_compose_cp.yaml +++ b/_vendor/github.com/docker/compose/v2/docs/reference/docker_compose_cp.yaml @@ -10,9 +10,9 @@ options: - option: all value_type: bool default_value: "false" - description: Copy to all the containers of the service - deprecated: true - hidden: true + description: Include containers created by the run command + deprecated: false + hidden: false experimental: false experimentalcli: false kubernetes: false diff --git a/_vendor/github.com/docker/compose/v2/docs/reference/docker_compose_export.yaml b/_vendor/github.com/docker/compose/v2/docs/reference/docker_compose_export.yaml new file mode 100644 index 000000000000..5dfb3be0a47b --- /dev/null +++ b/_vendor/github.com/docker/compose/v2/docs/reference/docker_compose_export.yaml @@ -0,0 +1,45 @@ +command: docker compose export +short: Export a service container's filesystem as a tar archive +long: Export a service container's filesystem as a tar archive +usage: docker compose export [OPTIONS] SERVICE +pname: docker compose +plink: docker_compose.yaml +options: + - option: index + value_type: int + default_value: "0" + description: index of the container if service has multiple replicas. + deprecated: false + hidden: false + experimental: false + experimentalcli: false + kubernetes: false + swarm: false + - option: output + shorthand: o + value_type: string + description: Write to a file, instead of STDOUT + deprecated: false + hidden: false + experimental: false + experimentalcli: false + kubernetes: false + swarm: false +inherited_options: + - option: dry-run + value_type: bool + default_value: "false" + description: Execute command in dry run mode + deprecated: false + hidden: false + experimental: false + experimentalcli: false + kubernetes: false + swarm: false +deprecated: false +hidden: false +experimental: false +experimentalcli: false +kubernetes: false +swarm: false + diff --git a/_vendor/github.com/docker/compose/v2/docs/reference/docker_compose_wait.yaml b/_vendor/github.com/docker/compose/v2/docs/reference/docker_compose_wait.yaml index 87f69059ce15..5d8f3013cc01 100644 --- a/_vendor/github.com/docker/compose/v2/docs/reference/docker_compose_wait.yaml +++ b/_vendor/github.com/docker/compose/v2/docs/reference/docker_compose_wait.yaml @@ -1,6 +1,6 @@ command: docker compose wait -short: Block until the first service container stops -long: Block until the first service container stops +short: Block until containers of all (or specified) services stop. +long: Block until containers of all (or specified) services stop. usage: docker compose wait SERVICE [SERVICE...] [OPTIONS] pname: docker compose plink: docker_compose.yaml diff --git a/_vendor/modules.txt b/_vendor/modules.txt index ef5eccf8c37b..49cad9b66715 100644 --- a/_vendor/modules.txt +++ b/_vendor/modules.txt @@ -1,6 +1,6 @@ # github.com/moby/moby v27.3.1+incompatible # github.com/moby/buildkit v0.16.0 # github.com/docker/buildx v0.17.1 -# github.com/docker/cli v27.3.1+incompatible -# github.com/docker/compose/v2 v2.29.6 +# github.com/docker/cli v27.3.2-0.20241008150905-cb3048fbebb1+incompatible +# github.com/docker/compose/v2 v2.30.0 # github.com/docker/scout-cli v1.13.0 diff --git a/content/manuals/compose/releases/release-notes.md b/content/manuals/compose/releases/release-notes.md index 8bdbb821b682..df95b0bc75d7 100644 --- a/content/manuals/compose/releases/release-notes.md +++ b/content/manuals/compose/releases/release-notes.md @@ -13,6 +13,32 @@ aliases: For more detailed information, see the [release notes in the Compose repo](https://github.com/docker/compose/releases/). +## 2.30.0 + +{{< release-date date="2024-10-29" >}} + +### Update + +- Dependencies upgrade: bump compose-go to v2.4.1 +- Dependencies upgrade: bump docker engine and cli to v27.3.1 + +### Bug fixes and enhancements + +- Introduction of service hooks support. +- Addition of alpha `generate` command. +- Addition of `export` command. +- Added support for CDI device requests using `devices` in the Compose file. +- A lot a bug fixes. + +## 2.29.7 + +{{< release-date date="2024-09-20" >}} + + +### Bug fixes and enhancements + +- Fixed a regression when using mount API for bind mounts. + ## 2.29.6 {{< release-date date="2024-09-19" >}} diff --git a/go.mod b/go.mod index bb24453ba25e..7e88fc496b6a 100644 --- a/go.mod +++ b/go.mod @@ -4,8 +4,8 @@ go 1.23.1 require ( github.com/docker/buildx v0.17.1 // indirect - github.com/docker/cli v27.3.1+incompatible // indirect - github.com/docker/compose/v2 v2.29.6 // indirect + github.com/docker/cli v27.3.2-0.20241008150905-cb3048fbebb1+incompatible // indirect + github.com/docker/compose/v2 v2.30.0 // indirect github.com/docker/scout-cli v1.13.0 // indirect github.com/moby/buildkit v0.16.0 // indirect github.com/moby/moby v27.3.1+incompatible // indirect @@ -14,7 +14,7 @@ require ( replace ( github.com/docker/buildx => github.com/docker/buildx v0.17.1 github.com/docker/cli => github.com/docker/cli v27.3.1+incompatible - github.com/docker/compose/v2 => github.com/docker/compose/v2 v2.29.2 + github.com/docker/compose/v2 => github.com/docker/compose/v2 v2.30.0 github.com/docker/scout-cli => github.com/docker/scout-cli v1.13.0 github.com/moby/buildkit => github.com/moby/buildkit v0.16.0 github.com/moby/moby => github.com/moby/moby v27.3.1+incompatible diff --git a/go.sum b/go.sum index 8259a1d72de5..9aef408d12cc 100644 --- a/go.sum +++ b/go.sum @@ -170,6 +170,8 @@ github.com/docker/compose/v2 v2.29.0 h1:qPBhzfjT2zkxUXuu+TcbQq292bPpB0ozzVHot2w2 github.com/docker/compose/v2 v2.29.0/go.mod h1:95QFO8lue3WJmLUDSdOLBkm7KdGhcG6U+RvVxrQIzOo= github.com/docker/compose/v2 v2.29.2 h1:gRlR2ApZ0IGcwmSUb/wlEVCk18Az8b7zl03hJArldOg= github.com/docker/compose/v2 v2.29.2/go.mod h1:U+yqqZqYPhILehkmmir+Yh7ZhCfkKqAvaZdrM47JBRs= +github.com/docker/compose/v2 v2.30.0 h1:EjtEBeIPeqzlY3DUQhdjkiMwigX8TrUrgPAyAqey1d0= +github.com/docker/compose/v2 v2.30.0/go.mod h1:WlU5gYgsYfNLuDeUdTusvutEC5PV3sDc15aClbR5lPw= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= diff --git a/hugo.yaml b/hugo.yaml index ba2782620fe7..385eb2c21e11 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -112,7 +112,7 @@ params: latest_engine_api_version: "1.47" docker_ce_version: "27.2.1" - compose_version: "v2.29.6" + compose_version: "v2.30.0" compose_file_v3: "3.8" compose_file_v2: "2.4" buildkit_version: "0.16.0"