Hacker News new | ask | show | jobs
by MrThoughtful 488 days ago
I never tried Podman. I guess the benefit is that it runs on demand and not as a always on demon?

How does one install podman on Debian and how does one get a Debian image to run inside podman?

5 comments

Runs on demand, doesn't require root, can be nested, usually uses newer and simpler primitives (e.g. a few nftables rules in Podman vs iptables spaghetti in Docker). In my experience it is ~90% compatible with Docker. The author explains the practical differences in the blog post https://www.edu4rdshl.dev/posts/from-docker-to-podman-full-m...

It is usually easier to install - most distros ship relatively recent version of Podman, while Docker is split between docker.io (ancient), docker-ce (free but non in repos) and docker-ee.

Not everything is rosy, some tools expect to be talking to real Docker and don't get fooled by `ln -s docker podman`. But it is almost there.

Regarding Debian, just `sudo apt install podman && podman run -it debian` - see https://wiki.debian.org/Podman

Careful, the version in Debian 12 is old and apparently just barely predates the "good" versions.

I had so many problems that I went back to Docker, because current Podman didn't seem to be trivially installable on Debian 12.

In general, if one is happy to run very old versions of software Debian can be your driver. If not, you are in for pain in my experience. (That is also why Ubuntu as default Linux is a tragedy, old bugs and missing features mean that it is not really attractive to officially support Linux for vendors.)
I've not experienced something on this scale for many years, "Debian stable packages are so outdated" is mostly a meme. Debian 12 was 1y old when I did this and very often you can relatively easily find a backport or build one - but I think in this case it was either glibc or kernel, that's why "just run upstream" didn't work.
What’s the point of using a distribution if you need to find back ports or build your own? Distros are, after all, mostly collections of installable software.
The point is that it works 95% of the time, or probably more like 98%.

If this is a e.g. webserver and I only need my fastcgi backend built by myself, I can still have reverse proxy, database, and every other package be done by the distro.

No one said you need backports. More like: If it fits 90% and one package doesn't work, you get it from somewhere else - that doesn't invalidate the concept of a distro for me. YMMV

I did not have this same experience, all my VPS successfully run Debian’s podman package with zero issue running containers.
Glad to hear. When I brought it up somewhere I got exact the "oh you're running 4.x - we also had that problem, but 5 works fine".
1) Podman is available in default debian repos. https://packages.debian.org/bookworm/podman

2) `podman run --entrypoint="" --rm -it debian:stable /bin/bash`

in most instances you can just alias docker to podman and carry on. It uses OCI formatted images just like docker and uses the same registry infrastructure that docker uses.

Installing `podman-docker` will do the aliasing for you.
Where does it pull the Debian image from?

I would think the Docker infrastructure is financed by Docker Inc as a marketing tool for their paid services? Are they ok when other software utilizes it?

On my system it asks between a few different public registries, and dockerhub/docker.io is one of the choices.

t's all public infrastructure for hosting container images, I don't think Docker-the-company minds other software interfacing with it. After all, they get to call them 'Docker images', 'Dockerfiles', and put their branding everywhere. At this point

By default it uses whatever is in registries.conf for unqualified-search-registries. You can specify in the fully qualified image name if you'd like.

I can't speak to what Docker Inc. is okay with or not.

> I guess the benefit is that it runs on demand and not as a always on demon?

Podman has much better systemd integration: https://www.redhat.com/en/blog/quadlet-podman

And you can use systemd to be their supervisor via quadlet: https://www.redhat.com/en/blog/quadlet-podman
apt install podman

podman run -it debian bash