Running Docker on OS X
Recently I started using Docker for my side projects and for the Valley Hackathon a couple weeks ago. I really like the flexiblity and encapsulation that it offers, in contrast to tools like Vagrant.
However, on a Mac, Docker runs on boot2docker, a tiny image built just to run Docker containers within VirtualBox. This can cause some problems with features such as shared folders, since the Docker container loads volumes from within the boot2docker machine, not your OS X machine.
Fortunately there’s a build of boot2docker that enables shared folders (via the Guest Additions). To install it:
If that worked and didn’t throw any errors, you’re ready to go! On my machine, it complained about the client and server running different versions. If this happens, just upgrade boot2docker:$ boot2docker upgrade
Now you can share folders with the
-v flag like so: