this post was submitted on 25 Oct 2024
122 points (99.2% liked)

Linux

48323 readers
629 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
top 12 comments
sorted by: hot top controversial new old
[–] mogoh@lemmy.ml 19 points 4 weeks ago (5 children)

How good is podman compose? I remember it had too many bugs for me to replace docker. 🤔

[–] garrett@lemm.ee 16 points 4 weeks ago (2 children)

podman-compose definitely got better over the past year...

But you can also use docker-compose itself with podman instead!

https://www.redhat.com/en/blog/podman-docker-compose

Basically, for system level containers, you can do:

sudo systemctl start podman.socket

(or enable --now instead of start if you want it to stick around after rebooting)

Then use docker-compose and it'll communicate with podman instead of docker.

For user session "rootless" containers, it's mainly the same thing, except you'll need to remove sudo and then add --user after start or enable in that systemctl command. And you'd need to set an environment variable (either prefixing it on the command or using export to set it in your session), like this:

DOCKER_HOST=unix:///run/user/$UID/podman/podman

(Put that in front of the docker-compose command and it'll connect to podman as your user instead, provided the service is available. Or toss it into your .bashrc with "export " before it and new bash sessions would have it.)

https://brandonrozek.com/blog/rootless-docker-compose-podman/

The one big gotcha I've hit is that if you have SELinux on your system, you'll want to add :z to your volume(s) mount to have it automatically deal with SELinux stuff. (Lowercase z for volumes that can be mounted for multiplayer containers and uppercase Z for volumes that are tied to a specific container.)

But, I've found that using "quadlet" service files is much, much better than using podman-compose or docker-compose. There's a program called "podlet" that can even convert compose files to service files (quadlet)... It can convert command line flags and kubes and other formats too.

Quadlets are basically systems service files that integrate with podman, letting you easily set up a container as a system (or even user level) service, making managing a container just like managing any other service.

Here's the podlet command that'll convert things to quadlets: https://github.com/containers/podlet

[–] Limeade3425@lemmy.one 1 points 3 weeks ago

Podlet looks amazing. Here I have been writing Quadlet files like a noob

[–] mogoh@lemmy.ml 1 points 3 weeks ago

Thank you for the in depth response. I will look into it and give it a try again. 😃

[–] dinckelman@lemmy.world 10 points 4 weeks ago

I replaced docker with podman on all of my systems, and so far i really have nothing to complain about. Works exactly as advertised

[–] Narwhalrus@lemmy.world 9 points 4 weeks ago (1 children)

In my experience podman compose is not a sufficient replacement.

Docker compose can be used with podman via the podman socket daemon. It's very easy to get working. Give it a try.

[–] nethad@discuss.tchncs.de 3 points 4 weeks ago (1 children)

It improved a lot and has a new maintainer, your problems might be solved by now.

[–] Narwhalrus@lemmy.world 1 points 4 weeks ago

I'll have to give it another try.

I should clarify that the issues I had were podman compose being able to run unaltered compose files that worked with docker compose, many of which were fairly complicated. It may have been adequate for simpler use cases back when I tried it.

[–] robber@lemmy.ml 8 points 4 weeks ago* (last edited 4 weeks ago)

Take a look at the podman kube play command which lets you run K8s-style stack definitions on podman. Has partly replaced compose for me (although I still have some docker servers running for stacks that don't play nicely with podman yet).

[–] nethad@discuss.tchncs.de 1 points 4 weeks ago

It was not great for a long time but improved a lot in 2024

[–] Molecular0079@lemmy.world 5 points 4 weeks ago

The failure to wait for network-online was the last thing preventing me from going rootless. I am going to have to try this again.

[–] Telorand@reddthat.com 3 points 4 weeks ago

Oo, I'ma have to revisit my "Private Internet Access in a container" attempts.