it's not always sunny with podman

I am moving from docker to podman and selinux because I thought that podman is more secure and hence, the future. I thought the transition will be somewhat seamless. I even prepaired containers but once I migrated I still ran into issues.

minor issue: it’s podman-compose instead of podman compose. The hyphen feels like a step back because we moved from docker-compose to docker compose. But thT’s not a real issue.

podman does not autostart containers after boot. You have to manually start them, or write a start script. Or create a systemd unit for each of them.

Spinning up fresh services works most of the time but using old services that worked great with docker are a pain. I am wasting minutes after minutes because I struggle with permissions and other weird issues.

podman can’t use lower number ports such that you have to map the ports outside of the machine and forward them properly.

Documentation and tutorials are “all” for docker. Github issues are “all” for docker. There isn’t a lot of information floating around.

I’m still not done and I really wonder why I should move forward and not go back to docker. Painful experience so far. linuxhandbook.com/docker-vs-podman/ and following pages helped me a lot to get rid of my frustration with podman.

nickwitha_k,

For the low-port issue, maybe try something like how K8S tends to handle it:

  • One container that is either rootful or allowed to use low ports. Run a reverse proxy like HAProxy or Envoy in this.
  • All other containers for services, run on high ports, pointing to them in the reverse proxy container’s config.
  • Don’t use bare http, unless required. Getting valid TLS certs is dead easy and free with LetsEncrypt.
possiblylinux127,

Podman compose isn’t really usable for me

MajinBlayze, (edited )

Yeah, podman’s networking approach sent me back to docker as well. I have a bunch of services that don’t even expose their ports to the local network, they just connect to each other, and only the reverse proxy is exposed. Switching to podman would require me to reconfigure all my port mappings to make sure there aren’t any conflicts, and then update all the references. It’s not a ton of work, but enough to keep me on docker for the time being.

edit: It looks like podman’s networking stack has changed since I used it, so this is almost certainly wrong now

deluxeparrot,

Is there a difference between networking approaches?

With rootful podman containers the only difference I noticed is that bridge networks aren’t isolated by default.

Why would you need to reconfigure the port mappings?

MajinBlayze,

Tbh it’s possible I messed something up, iirc the bridge network I was using wouldn’t work, and it seemed like it would only work in host mode, hence the belief that I needed to remap things. This was over a year ago, and tbh I didn’t try very hard to make it work.

lemmyingly,

Why do you believe podman is more secure than root-less Docker? Please educate me.

I run root-ful and root-less Docker daemons at the same time on the same machine because there are limitations to what you can do without as root privileges. So where possible, containers run in root-less Docker and the lucky few that require root privileges run in root-ful Docker.

GravitySpoiled,

I can’t

llii,

podman does not autostart containers after boot.

Does docker do this? I wrote a systemd unit for my docker container because I thought that there is no way for docker to autostart containers?

Molecular0079,

It does. You probably did not enable docker.service to start on boot.

llii,

Ok, i need to check this later. Thanks!

ikidd,
@ikidd@lemmy.world avatar

Not sure about straight docker run commands, but if you’re using docker compose you can add restart: unless-stopped or always to your docker-compose.yml to have it come up on boot.

shasta,

The only reasons I ever use podman is that is efficient with resources, and at work we can’t use Docker due to licensing purposes.

RandoCalrandian,
@RandoCalrandian@kbin.social avatar

I know this isn't the answer you want, but consider switching away from compose entirely
A local kubernetes instance handles all the routing for me, and since i was using that anyway podman was legitimately a drop in replacement for docker.

Podman is just the tool that creates the container for me, running it gets handled by something else entirely.

Also, i can run podman compose up just fine, no hyphen needed. https://docs.podman.io/en/latest/markdown/podman-compose.1.html

GravitySpoiled,

thx! maybe I’ll switch to it in a year or so. For now, I am good in learning new containerization technology

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • fightinggames
  • All magazines