this post was submitted on 03 Jul 2023
1002 points (98.2% liked)

Programmer Humor

19623 readers
25 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 1 year ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] ruffsl@programming.dev 54 points 1 year ago* (last edited 1 year ago) (2 children)

Image Transcription: Meme


A photo of an opened semi-trailer unloading a cargo van, with the cargo van rear door open revealing an even smaller blue smart car inside, with each vehicle captioned as "macOS", "Linux VM" and "Docker" respectively in decreasing font size. Onlookers in the foreground of the photo gawk as a worker opens each vehicle door, revealing a scene like that of russian dolls.


I'm a human volunteer content transcriber and you could be too!

[–] ruffsl@programming.dev 11 points 1 year ago

Just need to put a JIT compiled language logo inside the blue car and caption it as "Containerise once, ship anywhere".

Hoping somebody organizes a /c/TranscribersOfLemmy or /m/TranscribersOfKbin

[–] Ucinorn@aussie.zone 52 points 1 year ago (5 children)

Not just OSX: anyone using WSL on windows is an offender too

But as a WSL user, dockerised Dev environments are pretty incredible to have running on a windows machine.

Does it required 64 gig of ram to run all my projects? Yes. Was it worth it? Also yes

[–] Mermitian@lemm.ee 14 points 1 year ago (1 children)

I’m even worse, I have used wsl in a windows vm on my mac before haha

And use that to virtualize Android, to go even further beyond

[–] qwop@programming.dev 6 points 1 year ago (2 children)

My experience using docker on windows has been pretty awful, it would randomly become completely unresponsive, sometimes taking 100% CPU in the process. Couldn't stop it without restarting my computer. Tried reinstalling and various things, still no help. Only found a GitHub issue with hundreds of comments but no working workarounds/solutions.

When it does work it still manages to feel... fragile, although maybe that's just because of my experience with it breaking.

[–] desmaraisp@lemmy.world 2 points 1 year ago (1 children)

You can cap the amount of cpu/memory docker is allowed to use. That helps a lot for those issues in my experience, although it still takes somewhat beefy machines to run docker in wsl

[–] qwop@programming.dev 3 points 1 year ago

When it happens docker+wsl become completely unresponsive anyway though. Stopping containers fails, after closing docker desktop wsl.exe --shutdown still doesn't work, only thing I've managed to stop the CPU usage is killing a bunch of things through task manager. (IIRC I tried setting a cap while trying the hyper-v backend to see if it was a wsl specific problem, but it didn't help, can't fully remember though).

This is the issue that I think was closest to what I was seeing https://github.com/docker/for-win/issues/12968

My workaround has been to start using GitHub codespaces for most dev stuff, it's worked quite nicely for the things I'm working on at the moment.

load more comments (1 replies)
[–] MXX53@programming.dev 2 points 1 year ago* (last edited 1 year ago)

I work in a windows environment at work and my VMs regularly flag the infrastructure firewalls. So WSL is my easiest way to at least be able to partially work in my environment of choice.

load more comments (2 replies)
[–] entropicshart@lemmy.world 24 points 1 year ago (3 children)

Does docker really spin up a VM to run containers?

[–] Kuiche@programming.dev 25 points 1 year ago (1 children)

Yes, under windows and osx at least.

[–] jk47@lemmy.world 10 points 1 year ago (4 children)

Is that still true? I use Linux but my coworker said docker runs natively now on the M1s but maybe he was making it up

[–] declination@programming.dev 9 points 1 year ago (4 children)

I suspect they meant it runs natively in that it’s an aarch64 binary. It’s still running a VM under the hood because docker is really just a nice frontend to a bunch of Linux kernel features.

load more comments (4 replies)
[–] LaggyKar@programming.dev 9 points 1 year ago

Maybe they just meant that it runs ARM binaries instead of running on Rosetta 2.

[–] Shareni@programming.dev 3 points 1 year ago

Docker requires the Linux kernel to work.

M1 is just worse arm. Since most people use x86_64 instead of arm, docker had to emulate that architecture and therefore had performance issues. Now you've got arm specific images that don't require that hardware emulation layer, and so work a lot better.

Since that didn't solve the Linux kernel requirement, it's still running a VM to provide it.

load more comments (1 replies)
[–] httpjames@sh.itjust.works 5 points 1 year ago (1 children)

So that's why it's so memory hungry....

[–] h_a_r_u_k_i@programming.dev 2 points 1 year ago

Try limiting it down to 2GB (there is an option in the Docker Desktop app). Before I discovered this option, the VM was normally eating 3-4GB of my memory.

[–] epchris@programming.dev 4 points 1 year ago

On macos it does

[–] fmstrat@lemmy.nowsci.com 23 points 1 year ago (3 children)

Don't forget the ARM64 to AMD64 conversion.

[–] Satou@lemmy.world 10 points 1 year ago (1 children)

I was about to comment this. That van also contains QEMU if your host is on ARM64.

[–] hemmes@vlemmy.net 4 points 1 year ago* (last edited 1 year ago)

Bloody hell

Edit: Reminds of the pimp my ride meme. “We made you an OS so you can VM your VM inside a VM!”

[–] Satou@lemmy.world 2 points 1 year ago

I was about to comment this. That car also contains QEMU in case you own a Mac with M1/M2 chip.

load more comments (1 replies)
[–] YellowTraveller@lemm.ee 20 points 1 year ago (4 children)

When I was in school I once used a IOS emulator running inside a docker container of MacOS running on a linux machine. It works surprisingly smoothly.

load more comments (4 replies)
[–] bdonvr@thelemmy.club 12 points 1 year ago (1 children)
[–] astraeus@programming.dev 8 points 1 year ago

We're reaching levels of containerization that shouldn't even be possible!

[–] MartianInAHumansBody@lemmy.ca 12 points 1 year ago (1 children)

Add a JVM just for the hell of it

[–] Ddhuud@lemmy.world 9 points 1 year ago

A foldable bike in the trunk

[–] SpezCanLigmaBalls@lemmy.world 10 points 1 year ago

We need to go deeper and put a VM in linux

[–] Yoz@lemmy.world 10 points 1 year ago (3 children)

Can someone please explain me like i am 5 what is docker and containers ? How it works? Can i run anything on it ? Is it like virtualbox ?

[–] SantaClaus@aussie.zone 21 points 1 year ago* (last edited 1 year ago) (1 children)

Think of a container like a self contained box that can be configured to contain everything a program may need to run.

You can give the box to someone else, and they can use it on their computer without any issues.

So I could build a container that contains my program that hosts cat pictures and give it to you. As long as you have docker installed you can run a command "docker run container X" and it'll run.

[–] needthosepylons@lemmy.world 10 points 1 year ago

Well, I wasn't the one asking, but I learned from that nonetheless. Thank you!

[–] Spzi@lemm.ee 16 points 1 year ago

Is it like virtualbox ?

VirtualBox: A virtual machine created with VirtualBox contains simulated hardware, an installed OS, and installed applications. If you want multiple VMs, you need to simulate all of that for each.

Docker containers virtualize the application, but use their host's hardware and kernel without simulating it. This makes containers smaller and lighter.

VMs are good if you care about the hardware and the OS, for example to create different testing environments. Containers are good if you want to run many in parallel, for example to provide services on a server. Because they are lightweight, it's also easy to share containers. You can choose from a wide range of preconfigured containers, and directly use them or customize them to your liking.

load more comments (1 replies)

And of course, all of the above installed via Homebrew for extra recursion

[–] Xylight@programming.dev 7 points 1 year ago (1 children)

reminds me of a russian doll

[–] CmdrShepard@lemmy.one 5 points 1 year ago

I would not be surprised to learn this photo was taken in Russia.

[–] henfredemars@lemmy.world 7 points 1 year ago (1 children)

But it's Unix-like!

Uses a Linux VM for all the assignments anyway.

[–] aport@programming.dev 5 points 1 year ago

macOS is not unix-like, it is literally Unix.

[–] h_a_r_u_k_i@programming.dev 6 points 1 year ago (2 children)
[–] Exusgu@lemmy.world 3 points 1 year ago (1 children)

Podman on MacOS is the same, is it not? Running a containers inside a VM?

load more comments (1 replies)
[–] cx0der@lemmy.sdf.org 2 points 1 year ago

Podman does the same. Podman runs fedora.

[–] juliebean@lemm.ee 6 points 1 year ago

it's like an automotive turducken

[–] tomh@feddit.uk 3 points 1 year ago

Now run a KinD cluster inside that, with containers running inside the worker containers.

[–] PervServer@lemmynsfw.com 2 points 1 year ago

I mean I have Debian running an Ubuntu VM running docker. It's VMs all the way down baby

[–] blackstrat@lemmy.fwgx.uk 2 points 1 year ago (1 children)

I've run a VM on Proxmox which was running in VirtualBox on my Linix desktop to try out Proxmox and see if I could.

[–] Vortieum@sopuli.xyz 2 points 1 year ago
[–] nexusband@lemmy.world 2 points 1 year ago

Does this count for Docker in an LXC on Proxmox as well?

load more comments
view more: next ›