2 points

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

permalink
report
reply
12 points

Add a JVM just for the hell of it

permalink
report
reply
9 points

A foldable bike in the trunk

permalink
report
parent
reply
3 points

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

permalink
report
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
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
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
21 points

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.

permalink
report
reply
1 point

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?

permalink
report
parent
reply
3 points
*

Nope, Mac OS as a Docker container, it’s a thing: https://hub.docker.com/r/sickcodes/docker-osx

Also you don’t need a Linux VM to run docker containers on a Mac host btw

permalink
report
parent
reply
1 point

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

permalink
report
parent
reply
2 points

TIL, good to know!

permalink
report
parent
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