Live data from Hacker News

Quadlets might make me finally stop using docker-compose

major.io

141–150 of 212 posts

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

#141
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 f…

you might want to read this fine piece of propaganda https://github.com/madmurphy/libconfini/wiki/An-INI-critique...

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

#142

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.

Yeah, I see Docker Compose as a development environment setup aid. This seems like a way to set up a system.

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

#143
post #34

Earlier quoted context omitted.

> 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`. Is it? He defines a .network file in that butane config without it won't work. Not really obvious. I'm sure this has a use-case and it's nice to have but personally I'm not convinced. You can switch on user-namespaces in docker-daemon or even run docker itself ro…

butwhat? > Butane (formerly the Fedora CoreOS Config Transpiler, FCCT) translates human readable Butane Configs into machine readable Ignition Configs. igwhat? Why, WHY?!

Right?? They wrung everything possible out of that metaphor, and then some more, and then another bit more.

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

#144

Earlier quoted context omitted.

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.

Lolol have been running compose in dev & prod for 7 years - still the best tool around.

It will depend on the complexity of the stack, the number of environments you are deploying into, the number of devs on the team etc. It can work, and if it is working for you in this manner don't change what isn't broken, but in my experience for sophisticated systems with many services, envs, and developers it becomes unmanageable pretty quickly.

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

#145
A trick I have used sucessfully is to use docker-compose with podman as the engine.

The way I do it is by starting podman's systemd service which exposes a docker compatible API over a Unix socket.

Then export DOCKER_HOST pointing to the socket and you can run docker-compose with podman transparently.

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

#146

Earlier quoted context omitted.

> Sometimes you can't reuse a docker-compose file shared by a third party project straight away without adaptation So not a drop-in replacement then...

4 points: 1. Most of the issues I had that forced me to adapt a docker-compose was because I was using podman rootless and most people build docker-compose file with docker running as root in mind. mostly to have access to privileged ports. I guess running podman under root would have solved this but one of the reason I switched to podman in the beginning was for the rootless capability. In a way this wasn't much dif…

Overall fair points, though I disagree with 3 since it's been integrated sufficiently (not a separate install and not a separate executable).

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

#147

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.

For my home server, I have a flat 2507 line docker-compose file that automatically configures and boots all of my 85 containers. I still have some complexity: .env files in /opt//, a systemd process that automatically runs

  docker-compose -f //docker-compose.yaml -d
on boot, and it's only a little irritating to have use absolute paths for everything instead of relative. But, after having to update all of my services manually for 3 years, I will never be able to go back.

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

#148
post #134
post #76

Earlier quoted context omitted.

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

That's not the case (anymore). I run a NixOS based router with nftables (no iptables installed at all), and podman works just fine. It simply adds its NAT rules to nftables (unless you tell it not to). As far as I know, this was introduced with the new networking stack (netavark).

Do you have a link to your NixOS router config? Been thinking of doing this for a while but never got round to it.

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

#149

Earlier quoted context omitted.

Yes but when is someone going to add logic on top of this to make it a full blown distributed container orchestrator? Could it be done with systemd and dbus? Can dbus be distributed among several systems like mmc on Windows? I have no idea, just some questions that popped into my head lately.

https://github.com/containers/bluechi

Fett!

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

#150
post #90

Earlier quoted context omitted.

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

That section is only for the enablement of units, and is equivalent to the install section in a service file: https://www.freedesktop.org/software/systemd/man/systemd.uni...

You can still use all sorts of dependencies in the [Unit] section: https://www.freedesktop.org/software/systemd/man/systemd.uni...

Post reply on HN