Debugging with docker-compose fails because "phpstorm_helpers" cannot be started

Answered

Hey,

we have set up PHPStorm in combination with Docker and Docker-Compose to debug our application, this used to be fine on my machine but suddenly stopped working. Whenever I try to run any Unit tests from within my IDE, it now fails with:

ERROR: for phpstorm_helpers  Cannot start service phpstorm_helpers: network f0b9e27b90dc7776e55193e621396fc9a80f179460ee05731bc93a22d029a893 not found

I know that our docker and docker-compose configuration is correct since it works on other machines. I also verified that my configuration is correct (it also used to work before and was not touched). I am on Kubuntu 18.04 LTS and I use Docker version 18.03.1-ce.

My best guess is that it may be related to the fact that I did purge all docker containers previously and maybe that deleted the network that it is trying to connect to? All containers work fine if I start them manually and I can see that PHP and xDebug are properly installed when I use the appropriate docker-compose.yml:

$ docker-compose -f docker-compose.yml -f docker-compose.debug.yml run app_debug php -v
PHP 7.2.7 (cli) (built: Jul  6 2018 16:11:34) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans

Does anyone know what is up with this phpstorm_helpers service network and how I can maybe reset it? Is this maybe even a bug of some sorts?

7 comments

Try running docker container ls -a and then deleting all phpstorm_helpers_PS*** containers

4

It worked, thanks a ton my dude!

0

A quick little bash one-liner that uses Dmitry's method:

`docker container ls -a | grep phpstorm_helpers_PS | awk '{print $8}' | xargs docker rm`

0

Thanks Dmitry, it worked fir Pycharm as well.

1

@Dmitry Tronin why it does get created if not run? It is not within the list with running ones...

0

@Masergiu, we need them to create a volume that would later be mounted to your container, so that we could run stuff there - phpinfo(), tests and other things.

0

Please sign in to leave a comment.