You’re probably running into an issue with the underlying docker-java library used by PHPStorm. See https://github.com/docker-java/docker-java/issues/537#issuecomment-221219847 for details.
A workaround is to expose the unix socket via HTTP:
docker run -d -v /var/run/docker.sock:/var/run/docker.sock -p 127.0.0.1:1234:1234 bobrik/socat TCP-LISTEN:1234,fork UNIX-CONNECT:/var/run/docker.sock
Then you need to tell your PHPStorm to use the Docker host at localhost:1234
. On your shell that’s possible via:
export DOCKER_HOST=tcp://localhost:1234