this post was submitted on 11 Mar 2024
78 points (97.6% liked)

Selfhosted

39433 readers
870 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

I never understood how to use Docker, what makes it so special? I would really like to use it on my Rapsberry Pi 3 Model B+ to ease the setup process of selfhosting different things.

I'm currently running these things without Docker:

  • Mumble server with a Discord bridge and a music bot
  • Maubot, a plugin-based Matrix bot
  • FTP server
  • Two Discord Music bots

All of these things are running as systemd services in the background. Should I change this? A lot of the things I'm hosting offer Docker images.

It would also be great if someone could give me a quick-start guide for Docker. Thanks in advance!

you are viewing a single comment's thread
view the rest of the comments
[–] slazer2au@lemmy.world 20 points 6 months ago (13 children)

IMHO with docker and containerization in general you are trading drive space for consistency and relative simplicity.

a hypothetical:
You set up your mumble server and it requires the leftpad 3.7 package to run. you install it and everything is fine.
Now you install your ftp server but it needs leftpad 5.5. what do you do? hope the function that mumble uses in 3.7 still exists in 5.5? run each app in its own venv?

Docker and containerization resolve this by running each app in its own mini virtual machine. A container running mumble and leftpad 3.7 can coexist on host that also has a container running a ftp server with leftpad 5.5.

Here is a good video on what hole docker and containerization looks to fill
https://www.youtube.com/watch?v=Nm1tfmZDqo8

[–] riskable@programming.dev 26 points 6 months ago (8 children)

Docker containers aren't running in a virtual machine. They're running what amounts to a fancy chroot jail... It's just an isolated environment that takes advantage of several kernel security features to make software running inside the environment think everything is normal despite being locked down.

This is a very important distinction because it means that docker containers are very light weight compared to a VM. They use but a fraction of the resources a VM would and can be brought up and down in milliseconds since there's no hardware to emulate.

[–] uzay@infosec.pub -1 points 6 months ago* (last edited 6 months ago) (6 children)

~~To put it in simpler terms, I'd say that containers virtualise only the operating system rather than the whole underlying machine.~~

I guess not then.

[–] pztrn@bin.pztrn.name 7 points 6 months ago (1 children)

It virtualises only parts of operating system (namely processes and network namespaces with ability to passthru devices and mount points). It is still using host kernel, for example.

[–] loudwhisper@infosec.pub 0 points 6 months ago (2 children)

I wouldn't say that namespaces are virtualization either. Container don't virtualize anything, namespaces are all inherited from the root namespaces and therefore completely visible from the host (with the right privileges). It's just a completely different technology.

[–] steakmeoutt@sh.itjust.works 3 points 6 months ago

The word you’re all looking for is sandboxing. That’s what containers are - sandboxes. And while they a different approach to VMs they do rely on some similar principals.

[–] pztrn@bin.pztrn.name 1 points 6 months ago

I never said that it is a virtualization. Yet for easy understanding I named created namespaces "virtualized". Here I mean "virtualized" = "isolated". Systemd able to do that with every process btw.

Also, some "smart individuals" called comtainerization as type 3 hypervisors, that makes me laugh so hard :)

load more comments (4 replies)
load more comments (5 replies)
load more comments (9 replies)