Live data from Hacker News

Quadlets might make me finally stop using docker-compose

major.io

81–90 of 212 posts

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

#81
post #16

Earlier quoted context omitted.

INI files are not specified anywhere, so it ends up being a implementation-defined free-for-all. Also, YAML supports data structures that INI files don't. I don't understand the hate that YAML gets. If you're not tasked with writing a parser, the data format just works as expected.

It's not type safe.

So is JSON, and all mainstream config formats actually. However, that stopped being a problem with JSON schema, which, despite the name, works on yaml too.

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

#82

The syntax and examples in the article assumes usage of SystemD as service manager. Does it work on distros without SystemD too? Docker-compose does. I also do not understand separation of services to different files. Is it supposed to be more convenient? With docker-compose, the whole application stack is described in one file, before your eyes, within single yaml hierarchy. With quadlets, it's not. Lastly, I do not…

> Is software supposed to update without administrator supervision

yes proper CI is a thing, and containers not being updated is actually quite a bit of an issue in the current software industry

especially if combined with custom registries auto update is quite a neet thing

oh also it's a SystemD feature to let SystemD manage your containers so why are you asking if it works without SystemD?

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

#83
It seems like the coolest part of this isn't the systemd part necessarily (unless you're a systemd fan). It's that the combination of Quadlets + coreos gives:

- Node starts up with a container daemonized

- Automated updates of the registry image

- A nice single arg to pass to your cloud provider CLI userdata that launches the OS + container (vultr-cli in this case)

I guess you can do something similar with any linux userdata but the script wont be as clean. Has anyone built something lite to launch docker containers on boot in ubuntu (this is particularly helpful for cloud provider CLIs) without writing the whole script manually? Something nicer than `apt update && apt install -y docker && docker run --rm --restart-always ...` that includes the registry autoupdate.

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

#84
post #76
post #46

Earlier quoted context omitted.

What worse is , it screws up the firewall rules. Podman avoid that so , quadlets should be fine? Podman supposed to be drop-in replacement for docker but - last try (4 months ago) of podman to run our development docker containers fails to build so i think Podman is still far away from docker replacement.

> What worse is , it screws up the firewall rules. Yes! And it has a hard dependency on iptables, which I have removed from all my servers long ago in favor of nftables. Grrrrrr.

In recent versions of Ubuntu, Debian, and Arch /usr/bin/iptables is an iptables-compatible interface to nftables. That's what docker is using on those systems, and it works fine. You can manage those rules with /usr/bin/nft.

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

#85

> 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…

You can define Before, After, or WantedBy to define the dependency order. Systemd them makes sure to start services in the right order, it starts them by default but you can also configure services not to start if nothing depends on them.

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

#86
post #28

It's quite unfortunate that this article mixes up what's necessary for podman quadlets with coreOS concepts. With quadlets, the only thing required is to drop a `.container` file in the right place and you end up with a container properly supervised by `systemd`. And this of course also supports per-user rootless containers as described in [1]. [1]: https://www.redhat.com/sysadmin/quadlet-podman

I agree, and I think the author was unfortunately using coreOS because it's uncommon for cloud providers to have coreOS images nowadays, and therefore a good opportunity for him to slip in a referral code for VULTR.

Is coreOS even maintained any more? I wouldn't expect it to be very secure if the most recent VM images were built in ~2020.

Would love another writeup just using Ubuntu or some other bog-standard Linux distro.

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

#87
post #9

Nitpick you wonder why yaml is preferred to ini files when it is lined up to each other.

because inin files have no or very limited support for nesting

there are also some issues with keys being all string by default making some things like linting harder and allowing more less standard ways to get something done, e.g. in json true is true in init files all of true, 1, yes, y and others might be true depending on the application (but then yaml no problem is worse)

also there is no clear single standard for init files

through this is where toml comes from it took the general layout ideas behind init files but give it a strict standard and strict string vs. bool vs. float types and a bit more nesting capabilities and fixes some string distance escape issues, etc

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

#88

The syntax and examples in the article assumes usage of SystemD as service manager. Does it work on distros without SystemD too? Docker-compose does. I also do not understand separation of services to different files. Is it supposed to be more convenient? With docker-compose, the whole application stack is described in one file, before your eyes, within single yaml hierarchy. With quadlets, it's not. Lastly, I do not…

> Is software supposed to update without administrator supervision yes proper CI is a thing, and containers not being updated is actually quite a bit of an issue in the current software industry especially if combined with custom registries auto update is quite a neet thing oh also it's a SystemD feature to let SystemD manage your containers so why are you asking if it works without SystemD?

Updating your custom registry with new upstream dep versions after testing in CI with the all services you care about is fine. But the OP seems to just blindly pull the newest wordpress images from upstream or am I missing something? How is this meant to work reliably?

I guess given wordpress's security record taking breaking your site from time to time is preferable to your site being broken into from time to time.

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

#89

> 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…

I think it's a bit of a Podman quirk. From what I understand, podman used (and is probably still able) to generate systemd .service files. These files do have Requires and After commands, to state which other services they expect. However, Podman has since moved to using the .container file for systemd "units", which was meant to represent an transient, disposable instance but in practice reproduces a lot of what .service specifies. Probably because people didn't want to do the work twice, they tacked on an [Install] section to .container to make it behave like a service, which currently accepts only the keywords Alias, RequiredBy and WantedBy (I've not seen any documentation on how these differ) according to https://docs.podman.io/en/latest/markdown/podman-systemd.uni...

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

#90

> 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…

You can do it the other way if you want, using After= or Requires.

i don't think that's the case for .container files, according to https://docs.podman.io/en/latest/markdown/podman-systemd.uni...
Post reply on HN