Docker – An instant cluster on your PC

I’ve recently started working with Docker Toolbox at work. The original goal was to learn Docker and as we run Windows 7 machines this seemed like the way to go. It has since transformed into something far more useful.

I’m fully aware that Docker’s main purpose is not really the one I’m using it for but I’ve still found value. I’m often in need of many Linux servers to test the deployment of some tool that we’ll be rolling out. Sometimes it’s a well-known tool like Redis, other times it’s me needing to learn the intricacies of Ansible. Whatever the reason, it is a real pain in the behind to get a set of VMs from our central team. I don’t really need a ton of CPUs, RAM, disk space; they will sit idle most of the day. A public cloud could work here but I’m not allowed to use it. I really just need something with sshd and some basic tooling.

Enter Docker. After learning the ropes, which only took a few days, I was able to create a series of containers with sshd and the same ssh keys (insecure but convenient). Aside from the ease of setup there were several other benefits.

I dread it every time I can’t run something locally. I normally edit my code/scripts on my local Windows PC. This is simply more convenient; I have all my tools set up just the way I want them. I could edit the files remotely as I’m quite comfortable in vim but it is just inconvenient enough for me to do something about it. With Docker containers, I can mount a directory from my Windows box onto the container and have it act like a native directory. This has shortened my feedback loop (code, run, test) to the point where it’s the same as working locally.

I’ve been known to make mistakes; that’s how I learn. But some mistakes are easier to recover from than others. Blowing up something on a centrally provided VM is a time consuming process to fix. I could either revert stuff manually (ugh) or I could have the central team re-image the box (double ugh), both terrible options. The consequence of it being hard to recover is that I’m less likely to try things on those machines. This problem goes away with Docker; it takes me seconds to blow away the container and start a new one. This enables me to have more freedom in exploring new technologies.

Overall, I’m very happy with my current use of Docker and I look forward to discovering more unintended benefits from this approach.

P.S. I know I could have used Vagrant but it takes too much memory per Linux instance.


2 thoughts on “Docker – An instant cluster on your PC

  1. I haven’t used docker much but I think same can be achieved by installing Linux image on oracle virtual box and it’d run on win 7 as well.


  2. It’s true you could do something similar with VirtualBox or even with Vagrant. The nice thing about docker is that it will use a lot less memory/cpu so you will be able to run more.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s