ContainerService: Move force delete logic to daemon by dcantah · Pull Request #536 · apple/container

@dcantah

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.