What is Docker: An Informal Introduction

The Yuxi Blog
TheYuxiBlog
Published in
2 min readJan 3, 2018

“And the key to all this beauty? A single file”

Imagine a scenario where you, a budding Developer, have been hired to create an application. No matter which, just a run-of-the-mill standard app. Easy enough, right?

Now, consider what you require to get the application running. That would entail the implementation of a test environment, on a specific server (physical or virtual), with a specific OS, and obviously, very detailed hardware requirements for it to run comfortably.

“Piece of cake”, you’re probably thinking. But wait, what about latest updates to the OS, frameworks, libraries and the various interlocking pieces that make your idea a tangible reality?

Let me guess, it took you a couple of hypothetical hours, but now, you’re ready to do what you’re best at. Just another day at the office, am I right?

Now, after days, weeks or even months of coding till you drop, the app is ready in all its glory to be shown to the client. And then the damned thing doesn’t work.

“But… It worked in my environment!”, you immediately say to yourself, covering the anger of the hours, days or weeks to come re-coding until the client’s environment matches your own.

Sucks, doesn’t it?

What would you say, humble developer, if you had a testing environment that would always reflect exactly what you did, no matter who, where or when, that wouldn’t need the painful process of re-updating or reinstalling and, best of all… it would simply work, regardless of OS, infrastructure or level of complexity.

Enter Docker, the solution for standardized containerized applications.

Docker containers wrap a piece of software in a complete filesystem that contains everything needed to run: code, runtime, system tools, system libraries — anything that can be installed on a server. This guarantees that the software will always run the same, regardless of its environment.

What this means, in a nutshell, is that everything that is needed to run a test environment is not only self-contained but amazingly easy to replicate, distribute and deploy. Whatever you create within the container, will work as is, without ever needing to reinstall dependencies, libraries or any requirement that you already included.

And the key to all this beauty? A single file.

Almost like a cooking recipe or a chemical formula, a text file appropriately called Dockerfile will instruct the system to build the container exactly the way you want it, with all dependencies and libraries explicitly stated, commands to be executed once deployed, and even with the ports you want to be accessed within.

Like what you hear?

Stay tuned for the next entry in the Docker series: The Beautiful Magic of the Dockerfile.

--

--

The Yuxi Blog
TheYuxiBlog

We are a tech company with 13 years of experience that provides digital solutions to help you solve your business challenges! Contact us business@yuxiglobal.com