You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
stop() fails on a container started with withAutoRemove(true) #76
A container started with withAutoRemove(true) is removed by the daemon as soon as it exits. StartedGenericContainer::stop() still calls containerDelete() after containerStop(), so it races with the daemon and throws ContainerDeleteNotFoundException (or a 409 "removal already in progress" on Docker) when the daemon wins.
We hit it in a register_shutdown_function(fn () => $container->stop()) with a MySQL container:
PHP Fatal error: Uncaught Docker\API\Exception\ContainerDeleteNotFoundException: no such container
#3 vendor/testcontainers/testcontainers/src/Container/StartedGenericContainer.php(82): Docker\API\Client->containerDelete()
withAutoRemove() came in #60, but stop() was not updated for it.
Fix: stop() reads HostConfig.AutoRemove from the inspect response and skips the delete when it is set. PR follows.
Activity