this post was submitted on 09 Jan 2025
1130 points (98.3% liked)

Programmer Humor

20006 readers
834 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

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] MoonlightFox@lemmy.world 90 points 1 week ago* (last edited 1 week ago) (32 children)

There are another important reason than most of the issues pointer out here that docker solves.

Security.

By using containerization Docker effectively creates another important barrier which is incredibly hard to escape, which is the OS (container)

If one server is running multiple Docker containers, a vulnerability in one system does not expose the others. This is a huge security improvement. Now the attacker needs to breach both the application and then break out of a container in order to directly access other parts of the host.

Also if the Docker images are big then the dev needs to select another image. You can easily have around 100MB containers now. With the "distroless" containers it is maybe down to like 30 MB if I recall correctly. Far from 1GB.

Reproducability is also huge efficiency booster. "Here run these this command and it will work perfecty on your machine" And it actually does.

It also reliably allows the opportunity to have self-healing servers, which means businesses can actually not have people available 24/7.

The use of containerization is maybe one of the greatest marvels in software dev in recent (10+) years.

[–] alsaaas@lemmy.dbzer0.com 22 points 1 week ago (11 children)

Isn't Docker massively insecure when compared to the likes of Podman, since Docker has to run as a root daemon?

[–] hemko@lemmy.dbzer0.com 9 points 1 week ago (5 children)

Not only that but containers in general run on the host system's kernel, the actual isolation of the containers is pretty minimal compared to virtual machines for example.

[–] Clent@lemmy.dbzer0.com -3 points 1 week ago (1 children)

What exactly do you think the vm is running on if not the system kernel with potentially more layers.

[–] hemko@lemmy.dbzer0.com 19 points 1 week ago* (last edited 1 week ago)

Virtual machines do not use host kernel, they run full OS with kernel, cock and balls on virtualized hardware on top of the host OS.

Containers are using the host kernel and hardware without any layer of virtualization

load more comments (3 replies)
load more comments (8 replies)
load more comments (28 replies)