Why I moved from Vagrant to Docker as my default development environment?

You probably have already heard that old classic phrase:

I don’t know what’s happening… It works on my machine…

Vagrant came to solve this problem, providing a base image to all the team, ensuring that everybody have the same environment, with the same dependencies, at same versions.

But Vagrant (or any other virtualization solution) came with a big and boring problem (at least for me): virtualization sucks on development environment!

Endless provisioning and high memory consumption are just some examples of time wasting problems I faced while using Vagrant.

So, I decided to try Docker as my development environment.

First of all:
I know, dear IT purist friend, that Docker isn’t intended to be used as a software development environment, but if it solves my problem and improve my performance, that’s enough for me (and should be for everybody else).

And, after some time using Docker, It has become one of the must have items in my toolbox, and I show you why:

  • Lightweight environment:
    Forget about those massive virtual machines that consumes half of your memory. Docker containers acts like regular Unix processes, running in a protected namespace. So, the resource consumption is extremely low in comparison with virtualization solutions.

  • “Boot” velocity:
    Booting the virtual machine is no longer a pain. Spawning a new Docker environment, with all its dependencies, takes seconds, saving you precious seconds that can now be used to catch that annoying bug that is driving you crazy.

  • Alternatives:
    With Docker, it’s deadly easy to create a complete library of images, each one with its particularity: specific Ruby version, databases with preloaded data, different set of libraries for each environment, etc.
    Just select the necessary images, assemble them in a compose file and be happy 🙂

  • Full environment:
    Lift a virtual machine, with the base image, a database, cache application, full-text search engine, etc, when you just wanted to run a single unit test?
    Nooooo! With Docker, lift just what you need. Containers act just like modules, and each one is responsable to one (and only one) task, giving you the power to choose what to use and when.

These are just some of the points that lead me to abandon Vagrant (and any other virtualization solution) and embrace the beauty of containers.

New solutions are arriving to create a proper development environment using containers, such as Azk. So, if you’re tired of bouncing VM’s on your host when you just wanna code, give a chance to containers and thank me later 🙂