Magneticore

Development, Operations and Design

  • Articles
  • Resume
  • About Me
  • Contact
  • DevOps
  • Featured
  • Astronomy
  • Portfolio
  • UI/UX
You are here: Home / Articles / Docker OSX Vagrant and VMware fusion

Docker OSX Vagrant and VMware fusion

December 19, 2014 by Jorge Morales

Awhile ago I started exploring what containers were and how to wrap my head around them to do deployments.

I pointed my browser to Docker’s Mac OS X installation web page which read something like this:

Because the Docker daemon uses Linux-specific kernel features, you can’t run Docker natively in OS X. Instead, you must install the Boot2Docker application. Boot2Docker includes a VirtualBox VM, Docker itself, and the Boot2Docker management tool.

Since I already have another VM environment installed (aka VMWare Fusion) and also Vagrant, I wasn’t too keen to install VirtualBox just for the exploratory exercise.

The solution was rather simple. Use Vagrant to start a Linux Box and then Install Docker in it.

You can use the following Vagrantfile as an example.

  The Vagrantfile refers to bootstrap_docker.sh. This is a simple bash script that runs after Vagrant boots your VM and then installs Docker.  
Copy and paste the code into the Vagrantfile and bootstrap_docker.sh in a new directory then run Vagrant.

 

$ vagrant up
$ vagrant ssh

Once you ssh into the box test your Docker installation:

$ sudo docker run -i -t ubuntu /bin/bash

This will download the Ubuntu container and start a shell session on it.

Docker in Vagrant

That’s it!
Time to experiment with more containers.

Filed Under: Articles, DevOps

About the author

My name is Jorge Morales and I am an Electronics Engineer by training, a technology starter by choice and Open Source fan.
My curiosity led me to get involved in many areas from Instrumentation, Support, Operations to Development.
Often as a member of multidisciplinary teams, sometimes leading or working as a senior individual contributor.

I spend my time remixing the web Open Source style!
UNAM and Ottawa Startup Weekend Alumni, Co-founder of @YourBookBuddy.
I lead the implementation on Coral platform and production systems at CoralCEA.

Recent Articles

  • Kano Computer for Kids based on Raspberry pi
  • Welcome Home App and Meteor part 2
  • Welcome Home App and Meteor
  • Are we alone in the universe?
  • A new car UI
I'm currently looking for new opportunities. Are you interested, let's chat!

Work with Jorge Now

Previous role

Project Lead at CoralCEA where I led the implementation on Coral platform and Coral's production systems.

 

I’m also in here…

  • Email
  • GitHub
  • LinkedIn
  • Twitter

Copyright © 2025 · Magneticore · My online Resume

Copyright © 2025 · Log in