Getting started on Docker20 Jan 2015
Just this month, I have been tinkering this new technology that would allow me to package an application inside a container and then deploy this loaded container out there in the cloud.
What this mean is that when I decide to deploy this application to production, it is expected to just work. The containerized application that you have used and tested locally on your machine will be the same artifact you will be deploying to production.
The challenge then is how to install on my os x machine. This is tricky because docker does not natively support os x. It is more convenient for those who are using a distro of linux (typically ubuntu).
Now the adventure commences.
What do you need beforehand
I mentioned docker not supporting osx natively. I kinda lie there a little. Docker as far a I know uses a client and server architecture. The client part cant be installed and run on osx as it is on linux but that is not true for the server part. The server will be hosted inside a virtual machine (the headless virtualbox).
There are two known way of installing docker on mac. One way is via a .dmg installer that can be downloaded from docker official site and the other way is through the command line.
For this blog, I will be using homebrew since that is my preference.
I am not going to duplicate the effort of showing how to do it step by step using the homebrew package manager. I will rather give you the url.
I found this link helpful when installing it this way.
The only inconvenience here for me is how virtual box was installed on your machine. Since he did most of the guide with homebrew, it would only make sense to do this with vbox as well.
To install virtualbox, follow this guide.
Via the installer
Follow this link to know how to install it the easy way.
After installing docker on your machine, I recommend visiting this site and follow through the instructions. I would even advise you to redo it again after the first time. You'll never regret it. The guide is so welcoming to newbies that you might even ask the author to publish a book to take your money.