Following are some of my notes and thoughts while installing Docker on Mac OSX (10.9.2).
- Navigated to https://www.docker.io/
- Clicked on "Getting Started" https://www.docker.io/gettingstarted/
- Found small print with text "Looking to install?" and clicked "jump to installation" link https://www.docker.io/gettingstarted/#h_installation
- Clicked link for Mac OS X Provisioner http://docs.docker.io/en/latest/installation/mac/
cd ~/bin
curl https://raw.github.com/boot2docker/boot2docker/master/boot2docker > boot2docker
chmod +x boot2docker
curl -o docker https://get.docker.io/builds/Darwin/x86_64/docker-latest
chmod +x docker
export DOCKER_HOST=tcp://127.0.0.1:4243
sudo cp docker /usr/local/bin/
./boot2docker init
./boot2docker up
docker info
Running this from OS X 10.9.1+ yeilds the following:
Illegal instruction: 4
After googling this issue, it appears to be related to Clang compile flags moby/moby#4255
Temporary fix suggests using Docker 0.8.1 instead of the latest build, so with my current state, I did the following:
mv docker docker_newest
sudo rm /usr/local/bin/docker
curl -o docker https://get.docker.io/builds/Darwin/x86_64/docker-0.8.1
chmod +x docker
sudo cp docker /usr/local/bin/
Now running docker info
again correctly yields:
Containers: 0
Images: 0
Driver: aufs
Root Dir: /mnt/sda1/var/lib/docker/aufs
Dirs: 0
Debug mode (server): true
Debug mode (client): false
Fds: 10
Goroutines: 13
Execution Driver: lxc-0.8.0
EventsListeners: 0
Kernel Version: 3.13.3-tinycore64
Init Path: /usr/local/bin/docker
./boot2docker stop
for i in {49000..49900}; do
VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port$i,tcp,,$i,,$i";
VBoxManage modifyvm "boot2docker-vm" --natpf1 "udp-port$i,udp,,$i,,$i";
done
./boot2docker up
- Navigated back to https://www.docker.io/gettingstarted/
docker run ubuntu /bin/echo hello world
- It was a little cumbersome just trying to find instructions to download and install docker (at least on Mac OS X). I would suggest having some prominent badges linked directly from the home page for each of the most commonly used systems (Ubuntu, Mac, Windows, "Other")
- The docs for installation on Mac at least are outdated http://docs.docker.io/en/latest/installation/mac/ - They reference versions like 0.7.6 and 0.7.5 when the current stable versions are in the 0.8.x range. I suggest having automatic doc templates or docs somehow generated dynamically via code documentation from wherever the Mac compliation scripts reside along with continuous integration on a VM / container to ensure that the instructions still work with various versions of operating systems and platforms. This would also help alleviate issues like the
Illegal instruction: 4
I encountered.
Thanks--this was able to get me up and running, looking like the current docker master for OSX isn't quite working yet. Going back to 0.8.1 on OSX worked great!