this post was submitted on 03 Jul 2023
1009 points (98.2% liked)
Programmer Humor
19704 readers
117 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
It makes it very easy to define the environment and conditions in which a process is run, and completely isolate it from the rest of the system. The environment includes all the other software installed in said isolated environment. Since you have complete isolation you can install all the software that comes with what we think if as a linux “distribution”, which means you can do something like run a docker container that is “ubuntu” or “debian” on a “CentOS” or whatever distribution.
When you start a
Dockerfile
with the statementFROM ubuntu:version_tag
you are more or less saying “I want to run a process in an environment that includes all of the3 software that would ship with this specific version of ubuntu”A linux distro == Kernel + “user land” (maybe not the correct terminology). A docker container is the “user land” or “distro” + whatever you’re wanting to run, but the Kernel is the host system.
I found this pretty helpful in explaining it: https://earthly.dev/blog/chroot/
I’ll also say that folks say pretty nonchalantly deride Docker and other tools as if it’s just “easy” to set these things up with “just linux” and Docker is something akin to syntax sugar. I suspect many of these folks don’t make software for a living, or at least don’t work at significant scale. It might be easy to create an isolated process, it’s absurd to say that Docker (or Podman, etc..) doesn’t add value. The reproducibility, layering, builders, orchestration, repos, etc.. are all build on top of the features that allow isolation. None of that stuff existed before docker/other container build/deploy tools.
Note: I’m not a Linux SME, but I am a software dev who uses Docker every day — I am likely oversimplifying some things here, but this is a better and more accurate oversimplification than “docker is like a VM”, which is a helpful heuristic when you first learn it, but ultimately wrong
Whoah, thanks! Saved, i'll read it later.