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:// and from host machine (Windows) I can connect to it by ssh. Inside docker-machine I run containers with docker-compose.

  • How to increase Docker container default size?
  • Docker compose, interpolation of the assigned port
  • How to disable write barrier on docker thinpooldev?
  • Is that possible to get image ID from Docker Registry V2?
  • How to allow websockets to specific subdomain behind an nginx proxy?
  • Docker build/push every time - is it practical for continuous deployment?
  • 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.

  • Running tests with Docker and Jenkins - Test Result
  • Starting a Shell in the Docker Alpine Container
  • Access Docker container running in Vagrant
  • Mount git branches in a container
  • How to use docker android images on drone.io
  • How to let the docker container know itself is running with a host network?
  • 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.