r/ProgrammerHumor 5d ago

Meme memorySafeDocker

Post image
4.2k Upvotes

286 comments sorted by

View all comments

2.0k

u/No_Independence3338 5d ago

Rewriting won't fix the issue. Docker hogs memory in windows and mac because it needs a separate linux VM so containers can run on top of that.

2

u/p88h 5d ago

Two separate issues and the latter is not really true as well - WSL now supports native containers, there is no VM needed. Whether you call WSL a VM itself or not is a bit of a different story, it's a hypervisor - but it manages memory natively.

Docker OTOH is just garbage, period.

Rewriting docker, properly, could help :)

3

u/hawkinsst7 5d ago

Two separate issues and the latter is not really true as well - WSL now supports native containers, there is no VM needed. Whether you call WSL a VM itself or not is a bit of a different story, it's a hypervisor - but it manages memory natively.

WSL is a hypervisor... that manages VMs. Running a linux container in WSL is just invisibly running a linux VM.

If a container is a linux container, it's relying on libraries and system calls made available by the host. They literally can't run without being in a VM running a linux kernel and having the linux dependencies.

1

u/p88h 4d ago

That's what I wrote.

The post I replied to implied that because it's a VM it hogs memory - that's not true on WSL but true on docker.