-
Notifications
You must be signed in to change notification settings - Fork 255
introduce compose rm command #1299
Conversation
Signed-off-by: Nicolas De Loof <[email protected]>
projectOptions: p, | ||
} | ||
cmd := &cobra.Command{ | ||
Use: "rm [SERVICE...]", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add remove
as alias?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's no such thing as a remove
alias on docker rm
nor docker-compose rm
, so to prevent heterogeneous UX I'd prefer we keep such "UX improvement" a separate debate
local/compose/remove.go
Outdated
} | ||
msg := fmt.Sprintf("Going to remove %s", strings.Join(names, ", ")) | ||
if options.Force { | ||
fmt.Println(msg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about it but this may be the cause for the inconsistent output with the progress writer:
$ ./bin/docker compose rm --stop --force
The new 'docker compose' command is currently experimental. To provide feedback or request new features please open issues at https://github.com/docker/compose-cli
[+] Running 0/1
[+] Running 1/1mpose-cli_web_1 Stopping 0.3s
⠿ Container compose-cli_web_1 Removed 0.4s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yes indeed, need to get user interaction to take place before the progresswriter is started. But can't do this without breaking the backend API abstraction. Damned :'(
w := progress.ContextWriter(ctx) | ||
eg, ctx := errgroup.WithContext(ctx) | ||
for _, c := range stoppedContainers { | ||
c := c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
required. go iteration re-assigning c
variable. such a stupid idiom (ㆆ _ ㆆ)
Signed-off-by: Nicolas De Loof <[email protected]>
What I did
Reproduced
docker-compose rm
command and flags/test-windows
(not mandatory) A picture of a cute animal, if possible in relation with what you did