Erlang and Docker - Part 0 - The beginning

Docker is all the rage these days.
I mean look at this.
That’s 1/60th of minecraft.
So naturally, I decided to see what this is all about.

Basically, it allows you to pack your apps and all its dependencies in a common format to be deployed to The Cloud™.
By using this feature in the Linux kernel called container, applications run with almost zero overhead.
It also provides isolation between apps.
They say it starts up pretty fast too.

I can see this being a big deal for languages like php or ruby which comes with a bunch of dependencies.
For Erlang, not so much.
Release handling means you already pack only what you need into a release.
Erlang developers don’t ship their source code to servers.
We don’t even have to install Erlang on the target machine!
Build once, run everywhere!
Take that, Java!

Except that it’s not entirely true.
Try making a release on ArchLinux or Ubuntu and run it on CentOS.
Be prepared for those missing shared library errors.
That’s right, Erlang release can’t even run across distros since it’s dynamically linked by default and different distros handle libraries differently.
Just statically compiles everything then?
Easier said then done, have a look at this.
Currently I use Vagrant whenever I need to “cross-compile”.
VMs take a while to boot and customization/making your own image is intimidating.
Maybe it’s time to look at an alternative.

For users, Docker is pretty simple really.
It lets you build and launch images.
The concept is pretty similar to vm images.
You take a base image like ubuntu or centos then you add your stuff on top of it.
And then you will have a ‘lightweight’ image ready to be sent to the butt cloud.