Skip to content

Instantly share code, notes, and snippets.

@tobami
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tobami/c094f81e76f11ce061a2 to your computer and use it in GitHub Desktop.
Save tobami/c094f81e76f11ce061a2 to your computer and use it in GitHub Desktop.
Boot2docker
Install: http://boot2docker.io/
export DOCKER_HOST=tcp://:2375
# Make a volume container (only need to do this once)
$ docker run -v /data --name my-data busybox true
# Share it using Samba (Windows file sharing)
$ docker run --rm -v /usr/local/bin/docker:/docker -v /var/run/docker.sock:/docker.sock svendowideit/samba my-data
# then find out the IP address of your Boot2Docker host
$ boot2docker ip
192.168.59.103
Connect to the shared folder using Finder (OS X):
Connect to cifs://192.168.59.103/data
Once mounted, will appear as /Volumes/data
Docker
docker pull debian:wheezy
Linux
docker run -it -v ~/code:/data -d debian:wheezy
Mac
docker run -it --volumes-from my-data -d debian:wheezy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment