Playing with docker on Ubuntu(Parallels) from my Mac. The below commands are mostly from the below docker ubuntu install:

$ sudo apt-key adv --keyserver hkp:// --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
$ sudo apt-key adv --keyserver hkp:// --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
$ sudo touch /etc/apt/sources.list.d/docker.list

now I got tired of sudo making me sandwiches so I chmod the directory. Not sure if this is kosher.

sudo chmod -R 777 /etc/apt  
nano /etc/apt/sources.list.d/docker.list  

God. Everything requires sudo...

$ sudo apt-get update
$ apt-cache policy docker-engine
$ sudo apt-get install linux-image-extra-$(uname -r)

Now to install docker engine. (I'm not sure this is necessary)

$ sudo apt-get install docker-engine

At the suggestion of docker I

I went to the bathroom and my parallels ubunut machine locked me out. Now I had to restart my docker service. Most of you won't have to do that...

$ sudo service docker status
$ sudo service docker start

Now I pull my mono azure build

$ docker pull davidraleigh/monoazure

And I test to make sure it's running:

$ docker run -t -i davidraleigh/monoazure /bin/bash
root@a4cae838c950:/# echo "Words"  
root@a4cae838c950:/# exit  

After this I need mono for building my applicaiton

sudo apt-get install mono-complete  

Git was installed as part of the docker build, so I grab my source code from bitbucket and build it for release:

$ git clone

My docker file in this project looks like the following:

FROM ubuntu:14.04

MAINTAINER David Raleigh <>

#based on dockerfile by Jo Shields <>

RUN apt-get update \  
    && apt-get install -y curl \
    && rm -rf /var/lib/apt/lists/*

RUN apt-key adv --keyserver --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF

RUN echo "deb wheezy/snapshots/ main" > /etc/apt/sources.list.d/mono-xamarin.list \  
    && apt-get update \
    && apt-get install -y mono-devel ca-certificates-mono fsharp mono-vbnc nuget \
    && rm -rf /var/lib/apt/lists/*

ADD bin/Release/ .

CMD [ "mono", "geometry-client.exe" ]  

This above code relies on my having already build my project to bin/Release/. Now I build the docker geometry client and start it running to see if it all works:

$ docker build -t geomclient .

Now, I just test again that my client is working:

$ docker run -i -t geomclient mono geometry-client.exe
 [x] Requesting fib(5)
 [.] Got '5'

I'm doing the fibonacci tutorial from RabbitMQ and it looks like everything is golden (although I changed from 30 to 5, because, really who has time for 30!?!?!).

Next post is getting this image up on Azure.