mirror of
https://github.com/docker/compose.git
synced 2025-05-24 16:30:15 +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>
601 B
601 B
docker compose alpha watch
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 |