Direct access to containers using Boot2Docker

As part of using Docker as a development tool, I want direct access to docker containers that Boot2Docker has brought up.

For example if

  • Monitoring file changes in Docker volumes
  • how to create docker restricted network
  • Accessing apache2 residing inside Docker container from Host machine web browser
  • Docker routing/reverse proxy issue, can't curl other container
  • docker run mongo image on a different port
  • Are there any simple python packages that will run a prebuilt docker image
  • docker inspect {container id}

    says the ip is 172.17.0.5, I would like to be able to connect to the container via that ip address.

    I’m completely against mounting ports on the boot2docker vm and connecting via them, it wont work for me long term.

    Is there any kind of virtualbox config I can change to allow that kind of direct access.

  • Accessing MySQL Database on Host Machine from within Dockers Container
  • Building Dockers with Ansible docker_image
  • Pushing image to shared private repo
  • DC/OS JMX Access to java application
  • Docker: how to build an image from a non-master branch on Github repository
  • Set docker-compose environment variable to properly start Jenkins with custom java System.Property
  • One Solution collect form web for “Direct access to containers using Boot2Docker”

    This worked perfectly :
    sudo route -n add 172.17.0.0/16 boot2docker ip

    Found the answer on a comment here :
    http://ispyker.blogspot.co.uk/2014/04/accessing-docker-container-private.html

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