Abstract shipping containers pattern

DevOps · October 15, 2015

Juay the Docker

An intro to Docker — containers, images, and why they end the 'works on my machine' problem.

By Miguel Escalante

It works on my machine. — Dev.

!”#$%&”! the update broke my code. — Another Dev

I don’t have that version of the library. — Yet another Dev

If you are a SysAdmin or a DevOps in your company you’ve probably heard these words more than you should have. I hear you, been there.

The thing is that it can be really difficult to maintain the same environment throughout all the developers’ machines — the more specialized the setup, the more specific the requirements, and every single developer has their perks and preferences regarding how to configure their own working environments. Don’t get me wrong, they totally should — but there comes a time when you have to unite everything and get it into production, that’s when the nightmare fun begins.

Over the last couple of years one of the tools that has gained huge popularity and momentum is Docker, which in their own words is:

Docker is an open platform for building, shipping and running distributed applications. It gives programmers, development teams and operations engineers the common toolbox they need to take advantage of the distributed and networked nature of modern applications.

About the technical details of what Docker is, you can read the official docs or this Stack Overflow answer. In short, Docker is a way of running a lightweight virtual machine on your own computer — each Docker image contains enough of an operating system to reproduce the environment your app needs.

You can see how this fixes most of our problems with different environments and different OSes. The range of things we can do is huge. You can have a look at Jess Frazelle’s blog to see the kinds of containers she has made possible — Spotify, LibreOffice, R, nginx, and on and on. You can build a Docker image for your web app, your API, pretty much anything.

If you want to start using Docker, start here, grab a Docker Hub account, and have fun.