Learning Containers From The Bottom Up
When I started using containers back in 2015, my initial understanding was that they were just lightweight virtual machines with a subsecond startup time. With such a rough idea in my head, it was easy to follow tutorials from the Internet on how to put a Python or a Node.js application into a container. But pretty quickly, I realized that thinking of containers as of VMs is a risky oversimplification that doesn't allow me to judge:
- What's doable with containers and what's not
- What's an idiomatic use of containers and what's not
- What's safe to run in containers and what's not.
Since the "container is a VM" abstraction turned out to be quite leaky, I had to start looking into the technology's internals to understand what containers really are, and Docker was the most obvious starting point. But Docker is a behemoth doing a wide variety of things, and the apparent simplicity of docker run nginx
can be deceptive. There was plenty of materials on Docker, but most of them were:
- Either shallow introductory tutorials
- Or hard reads indigestible for a newbie.
So, it took me a while to pave my way through the containerverse.
I tried tackling the domain from different angles, and over the years, I managed to come up with a learning path that finally worked out for me. Some time ago, I shared this path on Twitter, and evidently, it resonated with a lot of people:
How to grasp Containers and Docker (Mega Thread)
— Ivan Velichko (@iximiuz) August 7, 2021
When I started using containers back in 2015, I thought they were tiny virtual machines with a subsecond startup time.
It was easy to follow tutorials from the Internet on how to put your Python or Node.js app into a container...
This article is not an attempt to explain containers in one go. Instead, it's a front-page for my multi-year study of the domain. It outlines the said learning path and then walks you through it, pointing to more in-depth write-ups on this same blog.
Mastering containers is no simple task, so take your time, and don't skip the hands-on parts!