4 ms·
Quadlet is a nice alternative for use-case of docker compose to "run all these interdependent containers in a production-like environment". I wish it (or someth
by psadauskas 2y ago
Quadlet is a nice alternative for use-case of docker compose to "run all these interdependent containers in a production-like environment". I wish it (or something) was better about the other use-case of docker compose: development. docker compose will bring up the db, redis, opensearch, and other random dependencies, an nginx proxy, and a dev container with `.:/app` mounted as a volume. You can bring up all those containers together, destroy them together, check in the docker-compose.yml file, etc...
Quadlet wants me to have all the files in `~/.config/containers/systemd`, so they're really not isolated to the project any more, and not in a convenient place to be checked in and shared with other devs (who also have to be using podman). Most still use docker, its what's availabile on codespaces and other hosted dev envs.
So we use docker compose, with a checked-in yaml file. I use podman, so I have to manually add `:Z` to all the volumes, but regular docker chokes on that. I wouldn't mind having an alternative to docker compose for development, but Quadlet doesn't seem like a good fit.
- deno 2y agoYou can use `podman-compose --in-pod=1 systemd -a create-unit` and it will create podman-compose@ service, then you can register compose.yml files with `podman-compose systemd -a register` with a $name, after that you can manage those pods based on compose files using podman-compose@$name.service. Works completely rootless too.
- sc68cal 2y agoA podman pod is what you are looking for, in that case, and I would orchestrate all that via Ansible, and distribute the Ansible playbooks to everyone else so they can run it locally.
- ptsneves 2y agosystemd-run allows you to run transient systemd services based on arbitrary commands. It will create nice transient units and if needed timers all with systemd scope rules. See [1] [1] https://www.freedesktop.org/software/systemd/man/systemd-run.html https://www.freedesktop.org/software/systemd/man/systemd-run...
- sally_glance 2y agoI feel your pain, my work is also using docker-compose.ymls for development. It works very well, except for the occasional misbehaviour on OSX because of that darn middleman VM. Every once in a while I check up on podman compatibility... But by now I've made my peace with that and accepted that the rootless philosophy is just too different to ever be fully compatible. This tool is still cool for prod though. I have a couple of hobby projects running on bare metal nodes under handcrafted systemd services (though currently in usermode containerd), I might just try migrating them... Whenever I find the time for that.
- axel7083 2y agoQuadlet are mostly for deployment I would say, if you are looking for an alternative to compose, probably take a look at Podman Kube Play[1]. This is a similar format that Kubernetes with some nice addition (being able to build container for example). The kube play can be at the root of your project, you can run `podman kube play project.yaml --build` and there it is! You pods, volume etc. running together. The Quadlet file can be useful as deployment step, you want to publish your project on a VPS? Use a Kube Quadlet[2] in addition with the `project.yaml` you have! [1] https://docs.podman.io/en/latest/markdown/podman-kube-play.1.html https://docs.podman.io/en/latest/markdown/podman-kube-play.1... [2] https://docs.podman.io/en/latest/markdown/podman-systemd.unit.5.html#kube-units-kube https://docs.podman.io/en/latest/markdown/podman-systemd.uni...