What the heck is Docker used for ?

Hey. Nice article, but you might be confusing people more than helping them. :-)

You wrote:

“ Ok so we can’t keep calling the box Docker sets up for you a virtual box or machine. Instead we refer to them as images.”

The actual “virtual box” is the Docker instance you install (Either native in Linux or with Docker for Windows (needs Windows 10 Pro) or Docker for Mac). The Docker instance gives the user a basic OS to work in and use Docker containers. You can consider this something like VirtualBox and this is like turning on a computer inside your computer. The Docker instance is the guest OS.

Where Docker then splits as an analogy from VirtualBox is, you don’t load up VMs in Docker. You load up or rather “run” containers.

You also wrote:

Images are kinda like OS ISOs and Containers like turning on a PC.”

It seems like containers are like turning on a PC, but it isn’t really what is going on and this analogy will probably give the reader a skewed mental model of what Docker is all about.

A container is supposed to be a process. In fact, Docker best practice dictates that each container only run “one” process. So, for instance, if you wish to run PHP, you’d only run PHP-FPM in one container (ignore that fact that FPM starts multiple processes). Nginx, however, would be ran in a different container. And if you had a database, that would be ran in another container.

Each of these software processes are defined through images.

I personally feel this term also causes confusion with those who know about Vagrant images or “boxes”. They are nothing like each other. Yes, you need a base OS “layer” within each container image, however, this has nothing to do with a running OS per se. The OS layer only defines the container’s OS environment. This is what allows for the cool portability of containers. For instance, you could run a PHP container based on an Alpine OS and also run a MySQL container based on a Ubuntu OS and they’ll both work like a charm in a Docker instance.

I think this image explains a lot.

As you can see, a “guest OS” is missing on the Docker side. This is, as you mentioned, why loading up and running Docker containers is so fast and why it helps developers be more productive. :-)