Moving to docker

Moving to docker

I recently started to tinker with Docker out of interest and to get into some new apparently hot topics. Being a vmWare certified professional, I mostly had experience with - well - virtual machines, may they be vmWare or KVM/QEMU. Docker promises some advantages over those technologies.

First of all, a Docker container seems to have a significantly lower overhead. That makes sense as it’s running a container in the host OS. A VM on the other hand runs a whole machine with BIOS, (guest) OS, etc. which makes for an overhead of at least a couple of hundred Megs for a skinny Linux system. The really interesting thing with Docker, however, is not resources but scalability. Once I have built my Docker image, I can easily spin up a whole bunch of them as they are needed and I can move them around. The Docker philosophy says, a container should always be completely disposable, so persistent data should be stored outside of the container. In practice that means, I can create a container image and spin it up e.g. for a web application. The container only contains the application while all data is handled in a storage backend. If my application needs to scale, e.g. because my company grows or my service becomes really popular, I just spin up additional containers on new machines. Now here comes the interesting part: Those machines don’t need to be on my premises. Most cloud providers offer resources on which Docker containers can be spun up. So no need to buy hardware, deal with depreciating, run a data center, etc. Just rent the resources from a cloud provider and spin up your containers. You can even go as far as spinning down resources e.g. during summer holidays when your application isn’t used as much and save some money.

Pretty cool stuff!

But why do I change to Docker now, you might ask… True, I don’t have massive web apps running or a big data center. And that’s kinda my point. I do run a bunch of services at home, like Nextcloud, my own mail server, Home Assistant, Asterisk, video surveillance, etc. At the moment that runs in a handful of VMs which eats a lot of resources on my poor little home server. Moving only 2 services out of VMs into Docker already saved me almost a Gig of continuous RAM usage. Also, with Docker I don’t have to worry about keeping x VMs up to date with OS patches etc. any more. And if my server gets old or burns out, I just spin up new containers on a new machine. No need to worry about installation, configuration, etc. etc.

If Docker can make life already so much more comfy on a little home server, I wonder what it can do for a business… In any case, I’m converted and now an avowed Docker fan.