[erlang-questions] erlang in docker from scratch

Nathaniel Waisbrot <>
Sun Mar 27 18:44:58 CEST 2016

> When packaging an application as a Docker container it is too easy to just be lazy and put "FROM debian" (other distributions are available, replace “debian" with your distribution of choice). For sure it is going to work, but you have just included dozens of libraries and binaries that your application just does not need. An image that could be tens of megabytes is now at least several hundred – we are building containers not virtual machines here!

There was a news story last month about Docker moving to Alpine Linux as its default base for this reason.

I just don't see it, though. I'm using Docker _because_ I'm lazy. If I wanted to not be lazy, I'd build a proper RPM or Debian package. Just for example: you've got libc on the host machine to run Docker, but you're also going to have libc on your image. So if saving a few MB is a big deal, then Docker was a bad decision.

My thinking with Docker is, "I want to take a bunch of short-cuts, and I am willing to pay for them in disk space and a little CPU performance." So why should I care if my Erlang release has to drag along 500 MB of extra junk? Particularly when Docker's got this whole layers thing that works pretty nicely. I've got containers from 5 different images (Erlang, Erlang, Python 3, Node.js, Nginx) on one host and they're all lazily based on some 500 MB base image, which means that each image only has an amortized cost of 100 MB garbage.

Are you doing embedded work? I saw a presentation about https://resin.io <https://resin.io/> that uses Docker on IoT devices and I could see where you'd worry about space when you're running a single Docker container on a Raspberry Pi. But, again, Docker seems like a strange choice there.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160327/fee72354/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160327/fee72354/attachment.bin>

More information about the erlang-questions mailing list