Creating a bootstrap Dockerfile that automatically exposes files to the host operating system

I’m trying to create a bootstrap Dockerfile for web development.

I would like any containers to allow for access of my code from within and also from the host operating system (Mac OS X).

  • How to connect to 'real' localhost from inside my VM boot2docker container?
  • How can I update DOCKER_OPTS in docker-machine permanently
  • boot2docker - add corporate certificate authority
  • Docker-machine : ca.pem not found
  • Docker: Mongo exits on run
  • Docker push fails, too many redirects
  • I cannot tell from the Docker reference what is the best way of automating this process.

  • Multiple public ip-addresses in Docker containers for outgoing connections
  • Docker custom dns resolve among containers
  • Unable to connect the client to the server using Docker COntainers
  • when we run the hello-world image its throws the connection refused error message
  • docker: show open ports from linked container
  • managing a hierarchy of docker images
  • One Solution collect form web for “Creating a bootstrap Dockerfile that automatically exposes files to the host operating system”

    Use a volume that mounts the code on the host into the container e.g:

    docker run -d -v /Users/me/code:/code IMAGE

    You should now find the /Users/me/code is accessible at /code in the container. The boot2docker VM has shared your home directory, so there should be no problem mounting a volume from there.

    Refer to the official docs for more information: https://docs.docker.com/userguide/dockervolumes/

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