Live data from Hacker News

Quadlets might make me finally stop using docker-compose

major.io

121–130 of 212 posts

Re: Quadlets might make me finally stop using docker-compose

#121

> you’ll see a WantedBy line. This is a great place to set up container dependencies. In this example, the container that runs caddy (a web server) can’t start until Wordpress is up and running. Either this must be some systemd weirdness that I thankfully haven't had to deal with until now, or I'm misunderstanding something. Did I understand correctly you don't specify which services you need but rather which ones de…

    [Install]
    WantedBy=multi-user.target
This is the mechanism by which one unit can ask to be added to the Wants= of another when it is installed.

i.e., when you run 'systemctl enable whatever.service', it will be symlinked into '/etc/systemd/system/multi-user.target.wants'. And 'systemctl show multi-user.target' will show 'whatever.service' in its Wants property.

https://www.freedesktop.org/software/systemd/man/systemd.uni...

During bootup of a headless system, the 'default' target is usually multi-user.target, so what we've done here is ensure that whatever.service will be started before the machine finishes booting.

https://www.freedesktop.org/software/systemd/man/bootup.html

Re: Quadlets might make me finally stop using docker-compose

#122

I never understood the appeal of docker-compose (you can accomplish roughly the same thing by having a Shell script that calls docker client, but skipping the Python clown fiesta with dependencies, environments etc.) Quadlets seems not exactly a replacement for the function docker-compose was supposed to perform though, or am I wrong? It seems like its target audience is administrators who are supposed to run contain…

Shell scripts suck to write and bash/zsh is a terrible language to have to deal with

[deleted]

Re: Quadlets might make me finally stop using docker-compose

#123
Quadlets are very much a welcomed integration but last time I tried to create an users Quadlet in .config/containers/systemd/ with a linuxserver.io image I ended up with all sort of files owned by strange UID & GID.

So I had to add --userns keep-id to my container unit what caused all sort of problem because of podman apparently.

So you always end up with the kind of investigation & fiddling that shouldn't be necessary after 10 years of docker & containers.

Re: Quadlets might make me finally stop using docker-compose

#125

Why the name quadlets? Classical definition: > A word consisting of four bytes Quad implies 4 something or rather. What does it refer to here? 4 sections of configuration?

programmers are absolutely terrible at naming things

Re: Quadlets might make me finally stop using docker-compose

#128

Feel like I've fallen out the back of the wardrobe into Narnia: the way we want to run containers on a machine is part of systemd? A thing that nobody understands, that isn't present on most machines.

systemd is everywhere and has been for a long time.

Re: Quadlets might make me finally stop using docker-compose

#129

I don't see how this is anything like compose. With quadlets you have to create a file for each container and deal with creating volumes and so on. Whereas with Docker it's one file, one command and you're done, you don't have to deal with anything else.

For anything other than a hello world type project a compose file will fall over kinda quick. I would much prefer to (ahem) compose smaller things together and systemd is great for that.

Re: Quadlets might make me finally stop using docker-compose

#130

Earlier quoted context omitted.

I also miss the simplicity of compose, but for me running rootless is worth the tradeoff. It also forced me to rethink how I used containers and I realized many times a simple podman_run.sh is enough. It also helped me understand containers better because there was less magic going on, sometimes limitations can be good.

Docker has native rootless support. But networking is a joke like podman.

FWIW podman 4's netavark has solved most of the pain points I encountered with podman's rootless networking. Containers can actually find each other now.
Post reply on HN