Hi, I've been thinking for a few days whether I should learn Docker or Podman. I know that Podman is more FOSS and I like it more in theory, but maybe it's better to start with docker, for which there is a lot more tutorials. On the other hand, maybe it's better to straight up learn podman when I don't know any of the two and not having to change habits later. What do you think?
For context, I know how containers works in theory, I know some linux I think well, but I never actually used docker nor podman.
In another words:
If I want to eventually end up with Podman, is it easier to start with docker and then learn Podman, or start with Podman right away?
Thanks in advance
Not sure why all the down votes without any explanation.
I too don't use docker for my services. I run Plex on my Arch install via the provided AUR package. 🤷♂️ Nobody told me I needed to do otherwise, with docker or anything else. Not sure why that would be better in any way. It could hardly be more performant? And it's as simple as enabling the service and forgetting about it.
Maybe they're having issues with his answer of "using an OS" which implies other people are not? IDK.
But as to you if you're running just one or two services from a machine you also use for other stuff using packages and systems services is perfectly fine. If you have dedicated hardware for it (or plan on having it), it starts to make sense to look at ways of making things easier for yourself in the long run. Docker solves lots of issues no one's talking about (because no one is facing them anymore), e.g.:
Different services requiring different versions of the same library/database/etc
Moving your service from one computer to another
Service requiring specific steps for updates (this is not entirely gone, but it's much better and it's prevents you from breaking your services by doing a random operation like updating your system)
Pinning versions of services until you decide to update without needing to sacrifice system updates for it (I know you can pin a version of a package, but if you don't upgrade it it will break when you upgrade it's dependencies)
Easily map ports or block access in a generic way, no need to discover how each service config file allows that, you can just do it at the container level. e.g. databases that can't be accessed from the network or even from within the host machine (I mean, they can obviously be accessed from the host system, just not in the traditional way, so a user who gains access to your machine on a user that's not allowed to use docker can't)
Isolation between services
Isolation from host machine
Reproducibility of services (i.e. one small docker compose file guarantees a reproducible host of services)
Endurance that no service is running as root (even if they only work as root)
Spin services in minutes to test stuff up and clean them out thoroughly in seconds.
There's probably many more reasons to use docker. Plus once you've learned it it's very easy for small self-hosted stuff so there's really no reason not to use it. Every time I see someone saying they don't use docker and don't understand why people use it I'm a bit baffled, it's like someone claiming he doesn't understand why people use knifes to cut bread when the two-handed axe he uses for chopping wood works (like, yes, it does work, but it's obviously not the best tool for the job)
Pretty good points. I especially like the no-root and isolation aspects, as well as the reproducibility aspect.
But I don't have enough services to warrant learning docker at a deeper level yet, and they aren't exposed on the internet yet either. Just local services so far. But all of those points are good to consider. Thanks for replying, friend! 🤝
People love to hate on people who don't care for containers.
Maybe so. 😕
what it means to run code on bare metal
I'm guessing it means something slightly different than what most people think, namely to just run it in the OS. Would you explain to me what it really means?
Bare metal would mean without an OS to manage peripherals, resources, even other tasks - like you might find on a resource-constrained embedded system.
The OS is in between the service and the bare metal. Something like OPNsense can be said to be running on bare metal because the OS and the firewall service are so intertwined. However, something like firewalld isn't running on the bare metal because it's just a service of the operating system.
I use distro packages. In the rare case something isn’t packaged yet, I package it myself. And for the isolation, systemd services can do most of the things docker can if you need (check systemd-analyze security).
For just hosting services that can be done instead with normal system services, docker makes your setup a lot more complex (especially on the networking side), for little if any gain. Unless I need to spin up something multiple times temporarily on demand or something has a hard dependency on it, I’m not going to bother with it anymore.