this post was submitted on 17 Nov 2024
284 points (98.6% liked)

Programmer Humor

32503 readers
474 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] traches@sh.itjust.works 53 points 1 day ago (5 children)

People don’t actually do this, right? Docker inside docker inside a VM inside another VM? On windows? Right????

[–] dan@upvote.au 3 points 22 hours ago

I've ran Docker in LXC in a KVM before. I used LXC to have multiple containers on a VPS. Then I had to run something that works best with Docker, so I stuck Docker in an LXC.

[–] MrScottyTay@sh.itjust.works 14 points 1 day ago (3 children)

I'm pretty sure docker recommends that it runs under WSL when on windows.

[–] dan@upvote.au 4 points 22 hours ago* (last edited 22 hours ago) (1 children)

Windows itself is technically running in a VM if you have Hyper-V enabled (not quite that simple, but that's a reasonable approximation). Hyper-V is a type 1 hypervisor which means it runs directly on the underlying physical hardware, and both Windows as well as any VMs you create are running on top of Hyper-V.

[–] MrScottyTay@sh.itjust.works 2 points 20 hours ago

Oh that's an interesting tidbit, didn't know that

[–] traches@sh.itjust.works 5 points 1 day ago

Yeah, docker in a VM makes sense. Docker in docker in a vm in a vm though?

[–] Matshiro@szmer.info 5 points 1 day ago

Yep, can confirm

[–] flashgnash@lemm.ee 17 points 1 day ago (2 children)

I've seen docker inside a VM before but that was just a dev box for testing

[–] twei@discuss.tchncs.de 3 points 22 hours ago (1 children)

That's the most reasonable part of the image

[–] flashgnash@lemm.ee 2 points 20 hours ago (1 children)

Are you not losing loads of performance by stacking vms like that?

[–] twei@discuss.tchncs.de 1 points 19 hours ago

Using Docker in a VM on a Hypervisor is industry standard, using docker inside of docker may be okay for CI purposes but I wouldn't do anything more than that in production if it's not necessary.

The stack from the image above (Windows>WSL> Docker>Minikube>Docker>App) is something you'd use on a dev machine (not a "real", production-like test environment), in which case you don't really care about the performance loss

[–] QuazarOmega@lemy.lol 16 points 1 day ago

That's super standard for actual infrastructure

[–] CameronDev@programming.dev 14 points 1 day ago

Isnt that exactly what minikube is? Kubernetes in docker.

I've used docker-in-docker images, but its usually not fun.