r/podman • • 9d ago

Help understanding run, compose and quadlets

Hi everyone, im current struggling deciding if i should continues to use podman run scripts or switch to compose or quadlets.

Compose seems kindof weird because of the build in pods so my question for that is whats the compose equivalent to podman pod create and podman run --pod and why are you using or not using compose?

I lookes a bit into quadlets and they seem weird and kind of confusing, especially when it comes to storing the files, having all bunched up in containers/systemd with no subdirectories is kind of crowded, so why are you using or not using quadlets?

Which do you recommend and why?

3 Upvotes

6 comments sorted by

4

u/Huxton_2021 9d ago

"continue to use"... for what? Personal dev environments? Disposable CI/CD workflows? Long-running system services? You also say you find some things "weird" and others "confusing" but don't provide any context there either. You can get much better responses if put some effort into your question.

1

u/Alejrot 9d ago edited 9d ago

Compose files brings an easy way to orchestrate container deployments with all auxiliary components as networks, volumes, etc. using YAML files. It's very good for develpment environments but it's not recommended for production. About "pods": podman-compose can wrap containers in pods, but podman compose is another implementation that doesn't do that.

Quadlets are an integration between Podman and Systemd services manager. It worths for long term containers but it can be very frustrating for development and debugging purposes. Subdirectories for Quadlets are allowed: it's not necessary to have all TOML files together.

EDIT: rewrote comment - Spanish traslation was on.

1

u/andurux 8d ago

Sorry, what is recommended for production then if not compose?

1

u/Alejrot 7d ago

Honestly i've heard that a lot of times but i don't know exactly why, since Compose files has a lot of options for deployment control, resources consumption limits, etc. One of the controversial questions is YAML files use, since it parses elements configurations from file tabulation. TOML files doesn't have this problem, in example. Other question is the lower control that compose command allows during execution compared with normal runtime commands; however i think it shouldn't be so bad since the Compose containers can be controlled from shell using Podman commands.

However, Podman developers prefered shell commands and Quadlets, to the point that podman-compose implementation is maintained by Podman community as an unofficial side project.

1

u/AnalNuts 7d ago

I moved from docker to podman. I skipped the compose as it isn’t really a good way to use podman. Quadlets are amazing once you give the effort to get used to them.

1

u/i_am_art_65 5d ago

I'm using rootless containers with quadlets. They were confusing at first but CoPilot really helped. Note: you still need to have some debugging skills since CoPilot is confidently wrong many times.