Docker current requires a Linux OS to run due to using
kernel technologies that are specific to this platform, such as
You can use Docker fairly painlessly on an OSX development machine by leveraging vagrant and some work by Mitchell Hashimoto and Steeve Morin.
These commands require
Create a directory to store your dockerfiles, and save the following file as
Vagrantfile in that location. You may want to adjust the
as necessary depending on what services you’re developing, or add a
private IP address
for convenient external access, etc. Please see the
Vagrant docs for more information.
Mounting local folders as a volume on a running instance of an image currently
doesn’t work on this method. You’d have to put the files on the VM running
Docker, and then SSH into it and use
docker run from there.
The (incredibly lightweight)
boot2docker VM used in this example does not
currently support Vagrant/Virtualbox shared folders easily if at all, so
if you need to do so, you may want to move to a full-blown Linux instance that
Docker supports, such as Ubuntu.
I’ve been playing with writing my own Dockerfiles and have used the above technique in the git repo.