mirror of
https://github.com/apple/container.git
synced 2026-07-14 05:27:02 +00:00
23c526233d
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.