It all started when I casually spotted a sponsored tweet offering me $10 worth of virtual computing power from digital ocean. I had seen their ads on everything from Facebook to Gmail and thought I’d check out what the fuss was about.
I had been planning to try docker.io on something other than my macbook for a while and was tempted to run up another linode server. Instead I decided to see if I could get docker running on digitalocean.
Docker turned 0.6 over the weekend and is heading full speed towards a production grade container platform. If you are reading this post you probably already interested in docker but for the uninitiated docker allows you to ship applications as containers running in what appears to be self contained linux environments. Its is based upon linux container magic and runs within same operating system as its host.
So here is my guide to get docker 0.6.1 running on digital ocean vm (5 minutes starts now!)
First create a new droplet based upon the Ubuntu 13.04 x64 image
Once it is created ssh directly on to the box as root, for me it was as simple as
Now following docker’s install guide I ran
apt-get update apt-get install linux-image-extra-`uname -r`
sh -c "curl http://get.docker.io/gpg | apt-key add -"
sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
apt-get install lxc-docker
Which allowed me to run docker for the first time
root@blog:~# docker version
Client version: 0.6.1
Server version: 0.6.1
Git commit: 5105263
Go version: go1.1.2
Last stable version: 0.6.1
Now to run something exciting, lets run redis
docker run -d johncosta/redis
Install redis-cli on the host machine
apt-get install redis-server redis-cli -h 18.104.22.168 -p 6379
Or connect from your macbook
brew install redis redis-cli -h 22.214.171.124 -p 6379
Now time to play with redis
redis localhost:6379> set docker magic
redis localhost:6379> get docker
5 minutes must be up by now!