Skip to content

Instantly share code, notes, and snippets.

@drewkerrigan
Last active December 10, 2020 06:17
Show Gist options
  • Save drewkerrigan/9470884 to your computer and use it in GitHub Desktop.
Save drewkerrigan/9470884 to your computer and use it in GitHub Desktop.
Some notes on my experience installing Docker on OS X 10.9.2

Notes on Installation of Docker

Following are some of my notes and thoughts while installing Docker on Mac OSX (10.9.2).

Find download information

Ran the following from terminal

Set Up Boot2Docker
cd ~/bin
curl https://raw.github.com/boot2docker/boot2docker/master/boot2docker > boot2docker
chmod +x boot2docker
Set Up Docker
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/
Download and Run a VM with Boot2Docker
./boot2docker init
./boot2docker up
Running a few Commands (from Mac OS X)
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
Make Containers Availalble Locally
./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

Running Docker Hello World

docker run ubuntu /bin/echo hello world

Suggestions for improvement

  • 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.
@ejhayes
Copy link

ejhayes commented Mar 12, 2014

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment