Skip to content

Commit 312f0d1

Browse files
gloursaevesdocker
authored andcommitted
Update dry-run documentation
Co-authored-by: Allie Sadler <[email protected]> Signed-off-by: Guillaume Lours <[email protected]>
1 parent e8caad1 commit 312f0d1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+375
-14
lines changed

docs/reference/compose.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ containers for the project.
175175
### Use Dry Run mode to test your command
176176

177177
Use `--dry-run` flag to test a command without changing your application stack state.
178-
Dry Run mode will show you all the steps Compose will apply by executing the command, for example:
178+
Dry Run mode shows you all the steps Compose applies when executing a command, for example:
179179
```console
180180
$ docker compose --dry-run up --build -d
181181
[+] Pulling 1/1
@@ -192,10 +192,10 @@ $ docker compose --dry-run up --build -d
192192
✔ DRY-RUN MODE - Container nginx-golang-mysql-backend-1 Started 0.0s
193193
✔ DRY-RUN MODE - Container nginx-golang-mysql-proxy-1 Started Started
194194
```
195-
You could see that the first step will be to pull the image defined by `db` service, then build the `backend` service.
196-
After that, containers will be created, the `db` service started and the `backend` and `proxy` will wait until `db` service is healthy to start.
195+
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.
196+
Next, the containers are created. The `db` service is started, and the `backend` and `proxy` wait until the `db` service is healthy before starting.
197197

198-
The Dry Run mode is not supported by all commands, especially by the command which doesn't change the state of a Compose stack
198+
Dry Run mode does not currently work with all commands. In particular, you cannot use Dry Run mode with a command that doesn't change the state of a Compose stack
199199
such as `ps`, `ls`, `logs` for example.
200200

201201
Here the list of commands supporting `--dry-run` flag:

docs/reference/compose_alpha.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ Experimental commands
1111
| [`watch`](compose_alpha_watch.md) | EXPERIMENTAL - Watch build context for service and rebuild/refresh containers when files are updated |
1212

1313

14+
### Options
15+
16+
| Name | Type | Default | Description |
17+
|:------------|:-----|:--------|:--------------------------------|
18+
| `--dry-run` | | | Execute command in dry run mode |
19+
1420

1521
<!---MARKER_GEN_END-->
1622

docs/reference/compose_alpha_viz.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ EXPERIMENTAL - Generate a graphviz graph from your compose file
77

88
| Name | Type | Default | Description |
99
|:---------------------|:------|:--------|:---------------------------------------------------------------------------------------------------|
10+
| `--dry-run` | | | Execute command in dry run mode |
1011
| `--image` | | | Include service's image name in output graph |
1112
| `--indentation-size` | `int` | `1` | Number of tabs or spaces to use for indentation |
1213
| `--networks` | | | Include service's attached networks in output graph |

docs/reference/compose_alpha_watch.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ EXPERIMENTAL - Watch build context for service and rebuild/refresh containers wh
55

66
### Options
77

8-
| Name | Type | Default | Description |
9-
|:----------|:-----|:--------|:------------------|
10-
| `--quiet` | | | hide build output |
8+
| Name | Type | Default | Description |
9+
|:------------|:-----|:--------|:--------------------------------|
10+
| `--dry-run` | | | Execute command in dry run mode |
11+
| `--quiet` | | | hide build output |
1112

1213

1314
<!---MARKER_GEN_END-->

docs/reference/compose_build.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Build or rebuild services
88
| Name | Type | Default | Description |
99
|:-----------------|:--------------|:--------|:------------------------------------------------------------------------------------------------------------|
1010
| `--build-arg` | `stringArray` | | Set build-time variables for services. |
11+
| `--dry-run` | | | Execute command in dry run mode |
1112
| `-m`, `--memory` | `bytes` | `0` | Set memory limit for the build container. Not supported by BuildKit. |
1213
| `--no-cache` | | | Do not use cache when building the image |
1314
| `--progress` | `string` | `auto` | Set type of progress output (auto, tty, plain, quiet) |

docs/reference/compose_config.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Parse, resolve and render compose file in canonical format
1111

1212
| Name | Type | Default | Description |
1313
|:--------------------------|:---------|:--------|:----------------------------------------------------------------------------|
14+
| `--dry-run` | | | Execute command in dry run mode |
1415
| `--format` | `string` | `yaml` | Format the output. Values: [yaml \| json] |
1516
| `--hash` | `string` | | Print the service config hash, one per line. |
1617
| `--images` | | | Print the image names, one per line. |

docs/reference/compose_cp.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Copy files/folders between a service container and the local filesystem
88
| Name | Type | Default | Description |
99
|:----------------------|:------|:--------|:----------------------------------------------------------------------|
1010
| `-a`, `--archive` | | | Archive mode (copy all uid/gid information) |
11+
| `--dry-run` | | | Execute command in dry run mode |
1112
| `-L`, `--follow-link` | | | Always follow symbol link in SRC_PATH |
1213
| `--index` | `int` | `0` | Index of the container if there are multiple instances of a service . |
1314

docs/reference/compose_create.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Creates containers for a service.
88
| Name | Type | Default | Description |
99
|:-------------------|:--------------|:----------|:----------------------------------------------------------------------------------------------|
1010
| `--build` | | | Build images before starting containers. |
11+
| `--dry-run` | | | Execute command in dry run mode |
1112
| `--force-recreate` | | | Recreate containers even if their configuration and image haven't changed. |
1213
| `--no-build` | | | Don't build an image, even if it's missing. |
1314
| `--no-recreate` | | | If containers already exist, don't recreate them. Incompatible with --force-recreate. |

docs/reference/compose_down.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Stop and remove containers, networks
77

88
| Name | Type | Default | Description |
99
|:-------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------|
10+
| `--dry-run` | | | Execute command in dry run mode |
1011
| `--remove-orphans` | | | Remove containers for services not defined in the Compose file. |
1112
| `--rmi` | `string` | | Remove images used by services. "local" remove only images that don't have a custom tag ("local"\|"all") |
1213
| `-t`, `--timeout` | `int` | `10` | Specify a shutdown timeout in seconds |

docs/reference/compose_events.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ Receive real time events from containers.
55

66
### Options
77

8-
| Name | Type | Default | Description |
9-
|:---------|:-----|:--------|:------------------------------------------|
10-
| `--json` | | | Output events as a stream of json objects |
8+
| Name | Type | Default | Description |
9+
|:------------|:-----|:--------|:------------------------------------------|
10+
| `--dry-run` | | | Execute command in dry run mode |
11+
| `--json` | | | Output events as a stream of json objects |
1112

1213

1314
<!---MARKER_GEN_END-->

0 commit comments

Comments
 (0)