Tuesday, November 24, 2015

Tech stuff: Docker, why it's a questionable choice, and more points against node.js

Docker seems pretty cool. Until you realize that the whole "super fast to start and scale" is only technically true because the platform is so neutered you're expected to run just a single process per container.

Relevant to many applications, including the one I have to work with: Want node (or anything else) in the same container as mongodb (or memcached, or anything else that might reasonably only serve a single VM)? Then your single process has to be supervisord (or something similar), otherwise the first process you start will be silently replaced by the second, will be silently replaced by the third, etc.

Considering you start with a full OS when building a Docker image, and the whole single-process-per-container is not even alluded to until you get way deep into the documentation into something that's both optional and dissuaded, this is horse puckey. The whole point of a modern OS is to run multiple applications simultaneously.

To me, the suggested way to do this -- to run separate sets of Docker containers for every service your application needs -- is insane and drowns the advantage of lightweight containers in complexity.

On top of that, one node.js image with our requirements weighs in at 1.5GB. Less than a third of that is the OS, which is so minimal it didn't even come with Python installed. So this time both Docker and node lose points (so, since node has long since gone negative and I started Docker at zero, neither is something I'm thrilled with).

No comments: