You know who you are

3 years ago by jerodsanto to c/programmer_humor

ruffsl 56 points 3 years ago

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!

path: 0 773958, hotness: undefined, score: 56, children: 2
ruffsl 9 points 3 years ago

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

path: 0 773958 773976, hotness: undefined, score: 9, children: 0
csolisr 6 points 3 years ago

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

path: 0 773958 787841, hotness: undefined, score: 6, children: 0
Ucinorn 51 points 3 years ago

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

path: 0 777603, hotness: undefined, score: 51, children: 8
Mermitian 12 points 3 years ago

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

path: 0 777603 784395, hotness: undefined, score: 12, children: 1
csolisr 7 points 3 years ago

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

path: 0 777603 784395 787814, hotness: undefined, score: 7, children: 0
qwop 6 points 3 years ago

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.

path: 0 777603 782747, hotness: undefined, score: 6, children: 3
desmaraisp 2 points 3 years ago

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

path: 0 777603 782747 785729, hotness: undefined, score: 2, children: 1
qwop 3 points 3 years 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.

path: 0 777603 782747 785729 786836, hotness: undefined, score: 3, children: 0
Ucinorn 1 point 3 years ago

I found the same thing until I started strictly controlling the resources each container could consume, and also changing to a much beefier machine. Running a single project with a few images were fine, but more than that and the WSL connection would randomly crash or become unresponsive.

Databases in particular you need to watch: left unchecked they will absolutely hog RAM.

path: 0 777603 782747 925065, hotness: undefined, score: 1, children: 0
Phoenix 1 point 3 years ago

I've used WSL to run deepspeed before because inexplicably microsoft didn't develop it for their own platform...

path: 0 777603 807106, hotness: undefined, score: 1, children: 0
MXX53 1 point 3 years 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.

path: 0 777603 826628, hotness: undefined, score: 1, children: 0
entropicshart 25 points 3 years ago

Does docker really spin up a VM to run containers?

path: 0 774799, hotness: undefined, score: 25, children: 13
Kuiche 23 points 3 years ago

Yes, under windows and osx at least.

path: 0 774799 774876, hotness: undefined, score: 23, children: 9
jk47 10 points 3 years ago

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

path: 0 774799 774876 775353, hotness: undefined, score: 10, children: 8
LaggyKar 8 points 3 years ago

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

path: 0 774799 774876 775353 779659, hotness: undefined, score: 8, children: 0
declination 8 points 3 years ago

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.

path: 0 774799 774876 775353 783375, hotness: undefined, score: 8, children: 4
Dohnakun 1 point 3 years ago

docker is really just a nice frontend to a bunch of Linux kernel features.

What does it do anyway? I know there's lxc in the kernel and Docker not using it, doing it's own thing, but not much else.

path: 0 774799 774876 775353 783375 787681, hotness: undefined, score: 1, children: 3
Shareni 3 points 3 years 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.

path: 0 774799 774876 775353 803572, hotness: undefined, score: 3, children: 0
aport 1 point 3 years ago

Not making it up, but possibly confused. OCI containers are built on Linux-only technologies.

path: 0 774799 774876 775353 780228, hotness: undefined, score: 1, children: 0
httpjames 5 points 3 years ago

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

path: 0 774799 776204, hotness: undefined, score: 5, children: 1
h_a_r_u_k_i 2 points 3 years 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.

path: 0 774799 776204 778897, hotness: undefined, score: 2, children: 0
epchris 4 points 3 years ago

On macos it does

path: 0 774799 775812, hotness: undefined, score: 4, children: 0
fmstrat 23 points 3 years ago

Don't forget the ARM64 to AMD64 conversion.

path: 0 774225, hotness: undefined, score: 23, children: 4
Satou 10 points 3 years ago

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

path: 0 774225 775271, hotness: undefined, score: 10, children: 1
hemmes 4 points 3 years 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!”

path: 0 774225 775271 778390, hotness: undefined, score: 4, children: 0
Satou 2 points 3 years ago
path: 0 774225 775220, hotness: undefined, score: 2, children: 0
Ucinorn 1 point 3 years ago

This was one of the reasons we switched to docker in the first place. Our Devs with M series processors spent weeks detangling issues with libraries that weren't compatible.

Just started using Docker and all of those issues went away

path: 0 774225 925120, hotness: undefined, score: 1, children: 0
YellowTraveller 21 points 3 years ago

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.

path: 0 787827, hotness: undefined, score: 21, children: 4
george 1 point 3 years ago

The difference between Docker and a VM is that Docker shares a kernel, but provides isolated processes and filesystems. macOS has a very distinct kernel from Linux (hence why Docker on macOS uses a Linux VM), I would be shocked if it could run on a Linux Docker host. Maybe you were running macOS in a VM?

path: 0 787827 807523, hotness: undefined, score: 1, children: 3
YellowTraveller 3 points 3 years ago path: 0 787827 807523 807829, hotness: undefined, score: 3, children: 2
george 2 points 3 years ago

TIL, good to know!

path: 0 787827 807523 807829 807830, hotness: undefined, score: 2, children: 0
fbartels 1 point 3 years ago

The first layer in that docker container is actually KVM. So you run the container to run kvm, which then emulates osx.

path: 0 787827 807523 807829 879118, hotness: undefined, score: 1, children: 0
bdonvr 13 points 3 years ago

Now add dind

path: 0 773717, hotness: undefined, score: 13, children: 1
astraeus 8 points 3 years ago

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

path: 0 773717 773900, hotness: undefined, score: 8, children: 0
MartianInAHumansBody 11 points 3 years ago

Add a JVM just for the hell of it

path: 0 808088, hotness: undefined, score: 11, children: 1
Ddhuud 8 points 3 years ago

A foldable bike in the trunk

path: 0 808088 809304, hotness: undefined, score: 8, children: 0
Yoz 10 points 3 years ago

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 ?

path: 0 787833, hotness: undefined, score: 10, children: 4
SantaClaus 20 points 3 years ago

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.

path: 0 787833 788004, hotness: undefined, score: 20, children: 1
needthosepylons 10 points 3 years ago

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

path: 0 787833 788004 789008, hotness: undefined, score: 10, children: 0
Spzi 16 points 3 years 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.

path: 0 787833 790268, hotness: undefined, score: 16, children: 0
Lmaydev 1 point 2 years ago

A container is a binary blob that contains everything your application needs to run. All files, dependencies, other applications etc.

Unlike a VM which abstracts the whole OS a container abstracts only your app.

It uses path manipulation and namespaces to isolate your application so it can't access anything outside of itself.

So essentially you have one copy of an OS rather than running multiple OS's.

It uses way less resources than a VM.

As everything is contained in the image if it works on your machine it should work the same on any. Obviously networking and things like that can break it.

path: 0 787833 9072378, hotness: undefined, score: 1, children: 0
SpezCanLigmaBalls 10 points 3 years ago

We need to go deeper and put a VM in linux

path: 0 773070, hotness: undefined, score: 10, children: 0
csolisr 10 points 3 years ago

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

path: 0 773935, hotness: undefined, score: 10, children: 0
henfredemars 8 points 3 years ago

But it's Unix-like!

Uses a Linux VM for all the assignments anyway.

path: 0 773684, hotness: undefined, score: 8, children: 1
aport 5 points 3 years ago

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

path: 0 773684 780281, hotness: undefined, score: 5, children: 0
Xylight 7 points 3 years ago

reminds me of a russian doll

path: 0 783992, hotness: undefined, score: 7, children: 1
CmdrShepard 4 points 3 years ago

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

path: 0 783992 790274, hotness: undefined, score: 4, children: 0
h_a_r_u_k_i 5 points 3 years ago path: 0 778968, hotness: undefined, score: 5, children: 3
Exusgu 3 points 3 years ago

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

path: 0 778968 782772, hotness: undefined, score: 3, children: 1
hawkwind 1 point 3 years ago

Yep. Just a nice GUI.

path: 0 778968 782772 783140, hotness: undefined, score: 1, children: 0
cx0der 2 points 3 years ago

Podman does the same. Podman runs fedora.

path: 0 778968 789476, hotness: undefined, score: 2, children: 0
juliebean 5 points 3 years ago

it's like an automotive turducken

path: 0 774926, hotness: undefined, score: 5, children: 0
tomh 3 points 3 years ago

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

path: 0 788346, hotness: undefined, score: 3, children: 0
nexusband 2 points 3 years ago

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

path: 0 777226, hotness: undefined, score: 2, children: 0
blackstrat 2 points 3 years ago

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.

path: 0 778710, hotness: undefined, score: 2, children: 1
Vortieum 1 point 3 years ago

Yo dawg

path: 0 778710 804283, hotness: undefined, score: 1, children: 0
PervServer 1 point 3 years ago

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

path: 0 9175819, hotness: undefined, score: 1, children: 0
programmer_humor
programmer_humor

@programming.dev

login for more options
31938
2357
7362

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

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

go to feed...