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

  • Import images from kitematic to boot2docker
  • What's the right way to setup a development environment on OS X with Docker?
  • boot2docker bash command line is very slow
  • Docker: communication between web container and php container
  • Is it possible to use Boot2Docker without VT-x?
  • Docker container change behaviour on different hosts
  • I cannot tell from the Docker reference what is the best way of automating this process.

  • API to get Top Docker Hub images? [closed]
  • Referencing files inside build (Docker)
  • Jenkins Docker Plugin does not seem to be provisioning slave containers for Jenkins builds
  • Can not curl docker swarm from remote host
  • `docker run` output to bash variable - strange behaviour
  • Running docker container through mitmproxy
  • 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.