6 points

Time to check out Podman.

https://podman.io/

permalink
report
reply
3 points

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

permalink
report
parent
reply
1 point

Yep. Just a nice GUI.

permalink
report
parent
reply
2 points

Podman does the same. Podman runs fedora.

permalink
report
parent
reply
10 points

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 ?

permalink
report
reply
21 points
*

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.

permalink
report
parent
reply
10 points

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

permalink
report
parent
reply
1 point

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.

permalink
report
parent
reply
16 points

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.

permalink
report
parent
reply
54 points
*

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!

permalink
report
reply
11 points

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

permalink
report
parent
reply

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

permalink
report
parent
reply
25 points

Does docker really spin up a VM to run containers?

permalink
report
reply
4 points

On macos it does

permalink
report
parent
reply
5 points

So that’s why it’s so memory hungry…

permalink
report
parent
reply
2 points

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.

permalink
report
parent
reply
26 points

Yes, under windows and osx at least.

permalink
report
parent
reply
10 points

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

permalink
report
parent
reply
1 point

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

permalink
report
parent
reply
3 points

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.

permalink
report
parent
reply
9 points

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.

permalink
report
parent
reply
9 points

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

permalink
report
parent
reply
10 points

We need to go deeper and put a VM in linux

permalink
report
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

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

Community stats

  • 3.4K

    Monthly active users

  • 1K

    Posts

  • 38K

    Comments