Conversation
Signed-off-by: Remco Kranenburg <[email protected]>
| Watch: upOptions.watch, | ||
| Prune: upOptions.prune, |
There was a problem hiding this comment.
I wonder if we should not pass directly WatchOptions
There was a problem hiding this comment.
we should just drop the api package and get CLI options used by composeService
| flags.BoolVar(&up.wait, "wait", false, "Wait for services to be running|healthy. Implies detached mode.") | ||
| flags.IntVar(&up.waitTimeout, "wait-timeout", 0, "Maximum duration in seconds to wait for the project to be running|healthy") | ||
| flags.BoolVarP(&up.watch, "watch", "w", false, "Watch source code and rebuild/refresh containers when files are updated.") | ||
| flags.BoolVar(&up.prune, "prune", false, "Prune dangling images on rebuild") |
There was a problem hiding this comment.
I wonder: is there any benefits not pruning those ? Shall we just make this the default ? Then do we need a flag ?
There was a problem hiding this comment.
Yep, I agree
@remcokranenburg do you mind adapting your PR to prune by default? We just need to keep it for the watch command itself to let users who want it to choose the option of keeping dangling images
There was a problem hiding this comment.
Sure! Would you also like to prune by default for the watch command? That might be more consistent, thus less surprising.
By keeping the flag, it should be possible to disable in either up or watch with --prune=0
There was a problem hiding this comment.
up already has so much flags we'd prefer not to have more. For those who really want to keep dangling images (?) watch --prune=false could be a reasonable workaround
There was a problem hiding this comment.
Yes I'm aligned with @ndeloof on this one, just keep the --prune flag for the watch command
BTW thank you for doing it 🙏
|
you have to run |
Note: this PR is reopened unchanged from one that was closed due to inactivity.
What I did
Just like #11932, which added
watch --prune, but now for the up command.Related issue
#11073
(not mandatory) A picture of a cute animal, if possible in relation to what you did
