Skip to content

Commit b0badf1

Browse files
Remco Kranenburgndeloof
Remco Kranenburg
authored andcommitted
Set watch option --prune=true as default
Signed-off-by: Remco Kranenburg <[email protected]>
1 parent 342a2a9 commit b0badf1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

cmd/compose/watch.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func watchCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service)
5959
}
6060

6161
cmd.Flags().BoolVar(&buildOpts.quiet, "quiet", false, "hide build output")
62-
cmd.Flags().BoolVar(&watchOpts.prune, "prune", false, "Prune dangling images on rebuild")
62+
cmd.Flags().BoolVar(&watchOpts.prune, "prune", true, "Prune dangling images on rebuild")
6363
cmd.Flags().BoolVar(&watchOpts.noUp, "no-up", false, "Do not build & start services before watching")
6464
return cmd
6565
}

docs/reference/compose_watch.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Watch build context for service and rebuild/refresh containers when files are up
99
|:------------|:-------|:--------|:----------------------------------------------|
1010
| `--dry-run` | `bool` | | Execute command in dry run mode |
1111
| `--no-up` | `bool` | | Do not build & start services before watching |
12-
| `--prune` | `bool` | | Prune dangling images on rebuild |
12+
| `--prune` | `bool` | `true` | Prune dangling images on rebuild |
1313
| `--quiet` | `bool` | | hide build output |
1414

1515

docs/reference/docker_compose_watch.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ options:
1919
swarm: false
2020
- option: prune
2121
value_type: bool
22-
default_value: "false"
22+
default_value: "true"
2323
description: Prune dangling images on rebuild
2424
deprecated: false
2525
hidden: false

0 commit comments

Comments
 (0)