Enter docker container from host using docker-machine

How can I connect to Php container from my Windows machine?

I run docker toolbox https://www.docker.com/products/docker-toolbox on my Windows 10 machine. It’s create docker-machine (env default) using virtualbox on port tcp://192.168.99.100:2376 and from host machine (Windows) I can connect to it by ssh. Inside docker-machine I run containers with docker-compose.

  • Can't connect to Docker container
  • Is it possible to run linux docker image on windows
  • Docker-compose container ports not working
  • How can I debug php mounted to a container running on docker beta for mac
  • Redis inter-container communication fails after restart of swarm manager
  • Running Vsts agent on nano server
  • I run PhpStorm on Windows and I want to configure PHP interpreter to listen to containerized php. I have read https://confluence.jetbrains.com/display/PhpStorm/Working+with+Remote+PHP+Interpreters+in+PhpStorm but still no sure how to configure it.

  • How can I make docker-compose build an image from a remote git repository?
  • Trying to run Docker resulted in exit code 127
  • For multiple projects using Docker, use Multiple VMs or Single Host with multiple containters
  • Docker: in memory file system
  • (Windows Git-bash) IntelliJ git bash shell color scheme messed up with Docker
  • Passing arguments to service in docker-compose.yml
  • One Solution collect form web for “Enter docker container from host using docker-machine”

    I found http://obrown.io/2015/12/23/phpunit-docker-phpstorm.html

    The goal create local php script and somehow provide in it connection to php.
    In the example author create new container and execute/link php there

    End of “docker-machine env default” output

    /usr/local/bin/docker run -i –rm -v “${PWD}”:”${PWD}” -w ${PWD} –net=host –sig-proxy=true –pid=host originalbrownbear/php:7-cli-phpunit php “$@”

    How can I configure such script to use existing docker container with php?

    Nornally I enter running container – docker exec -it container_tag_name /bin/bash
    And there I can execute php.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.