Skip to content

Conversation

@dcantah
Copy link
Contributor

@dcantah dcantah commented Aug 22, 2025

Today force deleting (if a container is running then stop()'ing first) is handled entirely in the cli, which is brittle. The CLI doesn't know if the container was started with --rm so it would have to do a weird timeout + list dance to check if the containers gone after stopping. This change remedies this by just having the daemon take in a force boolean to the delete rpc. If this is provided and the container is running then we'll stop first, and then cleanup. We can additionally not cleanup if --rm was provided as the daemon has the data to determine if a container asked for autoRemove.

@dcantah dcantah force-pushed the ctr-delete-force-fix branch from 794abb5 to 5d4d115 Compare August 26, 2025 17:42
Today force deleting (if a container is running stop()'ing first)
is handled entirely in the cli, which is brittle. The CLI doesn't
know if the container was started with --rm so it would have to do
a weird timeout + list dance to check if the containers gone after
stopping. This change remedies this by just having the daemon take
in a `force` boolean to the delete rpc. If this is provided and
the container is running then we'll stop first, and then cleanup.
We can additionally not cleanup if --rm was provided as the daemon
has the data to determine if a container asked for autoRemove.
@dcantah dcantah force-pushed the ctr-delete-force-fix branch from 5d4d115 to f9e3b83 Compare August 26, 2025 19:56
@dcantah dcantah merged commit 23c5262 into apple:main Aug 26, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants