r/ProgrammerHumor • • Sep 05 '26

Meme memorySafeDocker

Post image
4.2k Upvotes

278 comments sorted by

View all comments

71

u/Automatic-Boot665 Sep 05 '26

Memory safety != memory leak safety. You can still leak memory, you can just be fairly sure there aren’t two people writing to the same variable at once.

Plus docker doesn’t eat memory, docker desktop does.

19

u/AfraidAct1830 Sep 05 '26

Problem is that many people see containers as light weight vms. But they are not. It is just some files with their own fs, process tree etc all running on host OS with just an illusion of being in their own separate OS. I hope i have understood it correctly...

9

u/Reproman475 Sep 05 '26

I would just make one clarification that to my knowledge, Docker uses the host kernel, not necessarily the full OS. I'm just distinguishing that you can run an Ubuntu docker image on Redhat or something like that. Two different OS, same kernel

3

u/AsyncSyscall Sep 06 '26

What you are describing is a lightweight VM. Having to duplicate your system files takes up additional resources, but having to run an entirely separate kernel does even more so.

2

u/Grubs01 Sep 06 '26

Yes with some extra network routing rules added.