Hello! I have very little knowledge of podman but I generally use it to just host an Immich server, which usually just requires podman-compose up -d. It seems like podman is included in the default Bazzite install but not podman-compose. Is it generally more recommended to install podman compose or use Quadlet for this purpose?
You can use either podman-compose or a quadlet. I personally would choose a quadlet. It’s not hard to write a .container
file based off the compose.yml
file. man podman-systemd.unit
is a good reference.
Wait was quadlet supposed to come bundled with Bazzite? I flashed one yesterday and it doesn’t seem installed.
Nope, quadlet isn’t a separate command. You write the immich.container
file and place it under ~/.config/containers/systemd/
. Then run the following commands:
systemctl --user daemon-reload
systemctl --user start immich.service
The first command will build a systemd service in the user scope, which you can start, stop, restart like a regular systemd service.
Hm I wrote several containers and tried to start them but getting
raven@bazzite:~$ systemctl --user start immich-db.container
Failed to start immich-db.container.service: Unit immich-db.container.service not found.
raven@bazzite:~$ ls ~/.config/containers/systemd
immich-db.container immich-net.network
immich-machine-learning.container immich-redis.container
immich-microservices.container immich-server.container
it seems like i have the correct directory though
Actually for now I’ll just try the podman route for now to keep it simpler.
It wouldn’t be called immich-db.container.service
. The generated systemd unit file would be called immich-db.service
.
It’s fine thank you, I don’t think I understand quadlet enough nor do I think I will be able to. I’ll stick to podman as it currently works now.
No worries. Glad you got it working at least. And you can understand quadlets if you really want to
Yes this has been my experience with podman.
I’m sure quadlet is the superior piece of software, but trying to adapt projects configured for docker of docker-compose has always been a yak shave.
The word “want” is doing a lot of lifting here.
I have tried to figure out Quadlet several times until I realized that I’m not dense, I just haven’t accepted that it’s a DSL and there is no “learn quadlet the hard way” to walk me through every step.
One difference in the Fedora ecosystem is that we use buildah to create image and podman to run the container.
Buildah has an option to create a systemd unit file, which could be useful.
It’s not much different from writing a systemd unit file. If you know how to do that, you can pick up writing container quadlet files pretty easily. The main difference is that the .container
quadlet file is a sort of template from which systemd automatically generates the corresponding .service
file. You place the .container
file to its correct location under ~/.config/containers/systemd/
and run systemctl --user daemon-reload
, and you’ll have a regular systemd service in the user scope.
This question is right in my wheelhouse. Podman compose is really just a stop gap to help people transition from docker. It’s not something I would ever recommend. Quadlets started in Podman 4.5 and became the “official way” to do what you’re asking. You used to have to create the systemd file manually either by writing it yourself or most likely using podman generate systemd
, which is now deprecated. The way quadlets get pushed is as a half step to kubernetes. You can actually use a kube file and run that. You can take your current, running container and use podman generate kube
to generate that kube file, then point your quadlet at that kube file.
Since quadlets are being mentioned, just wanted to bring attention to GitHub - containers/podlet: Generate Podman Quadlet files from a Podman command, compose file, or existing object as tool to generate systemd .container files straight from compose files. Its compatibility is pretty good, with a couple of slight modifications needed here and there (e.g. it doesn’t like external
property on networks, but that’s easy to remove before running the command, and only matters for more complex setups anyway).
You can even have it place the .container file directly into the standard location using the -u
flag. It’s really nifty!
But do quadlets also deal with the usual issues one faces when migrating to Fedora, being used to docker-compose? Mostly the impossible to deal with SELinux security..
9 out of 10 times you end up disabling it completely for containers.. which is ofc not frecommended.