mirror of
https://github.com/docker/compose.git
synced 2025-05-25 00:40:12 +02:00
The `alpha watch` command current "attaches" to an already-running Compose project, so it's necessary to run something like `docker compose up --wait` first. Now, we'll do the equivalent of an `up --build` before starting the watch, so that we know the project is up-to-date and running. Additionally, unlike an interactive `up`, the services are not stopped when `watch` exits (e.g. via `Ctrl-C`). This prevents the need to start from scratch each time the command is run - if some services are already running and up-to-date, they can be used as-is. A `down` can always be used to destroy everything, and we can consider introducing a flag like `--down-on-exit` to `watch` or changing the default. Signed-off-by: Milas Bowman <milas.bowman@docker.com>
17 lines
601 B
Markdown
17 lines
601 B
Markdown
# docker compose alpha watch
|
|
|
|
<!---MARKER_GEN_START-->
|
|
EXPERIMENTAL - Watch build context for service and rebuild/refresh containers when files are updated
|
|
|
|
### Options
|
|
|
|
| Name | Type | Default | Description |
|
|
|:------------|:-----|:--------|:----------------------------------------------|
|
|
| `--dry-run` | | | Execute command in dry run mode |
|
|
| `--no-up` | | | Do not build & start services before watching |
|
|
| `--quiet` | | | hide build output |
|
|
|
|
|
|
<!---MARKER_GEN_END-->
|
|
|