Skip to content

Registry tries to cleanup containers whose removal started already #13

@dinamic

Description

@dinamic

I'm faced with the following error message and I was wondering why that is.

This is probably a race condition between the --rm option passed to the container upon creation and the docker rm -f the Registry::remove() method calls. Maybe docker tries to automatically remove the container and Registry::remove() requests the same.

Is there a particular reason why the Registry is needed?

Fatal error: Uncaught Symfony\Component\Process\Exception\ProcessFailedException: The command "'docker' 'rm' '-f' 'testcontainer66959b43958a96.16963867'" failed.

Exit Code: 1(General error)

Working directory: /var/www/html

Output:
================


Error Output:
================
Error response from daemon: removal of container testcontainer66959b43958a96.16963867 is already in progress
 in /var/www/html/vendor/symfony/process/Process.php:270
Stack trace:
#0 /var/www/html/vendor/shyim/testcontainer/src/Container/Container.php(230): Symfony\Component\Process\Process->mustRun()
#1 /var/www/html/vendor/shyim/testcontainer/src/Registry.php(36): Testcontainer\Container\Container->remove()
#2 [internal function]: Testcontainer\Registry::cleanup()
#3 {main}
  thrown in /var/www/html/vendor/symfony/process/Process.php on line 270

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions