Docker gives a way to run multiple applications in parallel. Each application runs on its own secure environment, isolated from the main application and from other Docker instances.

Does this sound like Chinese? No worries! You can think of a Docker image (an application running in Docker) as a frozen meal. Let’s say you have an amazing lasagna recipe (Dockerfile). You can prepare a big plate (Copy it many times) and then freeze small portions (Docker Images) to reuse later (Run the Docker Image) or to share with your friends (Share it on the Docker Hub).

Another example: let’s say I am a developer at YouTube and I just created an update. Instead of having to install it on every single server in each of the countries, I can use Docker to put the updated version in a Docker image and send it to all servers.

But that is not all! Imagine you have some friends coming over who all want something else to eat. You put a pizza in the oven, a portion of the lasagna you made earlier and then you cook some french fries as well. Much in the same way, Docker is able to run multiple different applications side by side.

Same thing for the YouTube example. Can you guess it already?

YouTube is owned by Google. In the same way, as you are able to make different dishes in the same kitchen, Google is able to run an instance of Google Search, an instance of Gmail and an instance of Youtube on the same server.

Now, another advantage of Docker is that it keeps every application in an isolated, secure environment. For the lasagna example, imagine one of the dishes gets contaminated by food poisoning. Docker will make sure that none of the other dishes is affected by keeping them all in separate environments. Same goes for YouTube. If a hacker breaks into the YouTube server, he won’t be able to read the emails stored in Gmail. The plastic film that blocks food poisoning is called container.

And just like frozen food, if you don’t feel like cooking today, you can just put a TV dinner in the microwave. The equivalent in Docker would be to pull a Docker Image from the internet (The Docker Hub) and use it to host your new blog without the hassle of setting it up.

So long story short: what is Docker? It’s a way to run application already configured by yourself or by someone else. It can also run multiple application side by side each in an isolated secure environment called a container.

I hope the lasagna example made the explanation above look a little less like Chinese to you ;)

BONUS: One last cool trick that Docker has up its sleeves is Docker Swarm. Imagine you are managing a buffet restaurant. The easiest way to serve customers is to have three big plates of lasagna and let people serve themselves. When one plate starts to get empty, people will start eating from the second, and in the end from the third. When they are almost empty, people will scrap the bottom of the plates.

Well, Docker Swarm does exactly the same thing. When running a website, you can actually run Docker Images within the same website. When one of them becomes overloaded by traffic, Docker will start redirecting people to the second one and the third one. This is called load balancing. And with the magic of Docker, the different Docker images can even be on different physical servers!

Hope you liked it! Do not hesitate to clap away and comment if you have questions!