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).

  • Docker. No such file or directory
  • Logstash in Docker - config file not found when mounted though a volume
  • docker on windows not working
  • docker toolbox: Is there a way to mount other folders than from c:\Users Windows?
  • Get and pass into container the host IP address
  • Error when doing a docker ps
  • I cannot tell from the Docker reference what is the best way of automating this process.

  • 'aws configure' in docker container will not use environment variables or config files
  • Selenium Grid with Docker containers on different hosts
  • Does 'docker run' modify image state?
  • Rails, Docker: Host does not exist: “default”
  • Precompiled assets absent in the docker image
  • Change Docker machine location - Windows
  • 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.