Unable to use a docker-container as the php interpreter in PhpStorm on Windows
I use docker-tools to run docker on Windows 7. I have the docker-machine setup and the commands I run from the command line work fine.
I’m now trying to integrate this in PhpStorm. Here are the 2 things I tried:
1. As a local interpreter
php.bat with the following content
@echo off SET DOCKER_TLS_VERIFY=1 SET DOCKER_HOST=tcp://192.168.99.100:2376 SET DOCKER_CERT_PATH=C:\Users\phillaf\.docker\machine\machines\default SET DOCKER_MACHINE_NAME=default docker run -it --rm -v /c/Users/phillaf/app:/app -w /app php php %*
I can use
php.bat to run php scripts successfully from the windows command line. In PhpStorm I tried adding
php.bat as a local PHP interpreter, but it’s not recognized as an interpreter.
2. As a remote interpreter
I can connect successfully to docker-machine with putty using
tcuser. However PhpStorm seems to be unable to connect with the same infos. I tried setting it up as a remote interpreter.
Settings > Languages & Frameworks > PHP > Interpreters > Remote I add the SSH info and then click browse. I get the error “failed to send channel request”.