r/linux • u/Unprotectedtxt • Oct 27 '25
Open Source Organization Docker Alternative: Podman on Linux
https://linuxblog.io/docker-alternative-podman-on-linux/TL;DR Podman is less popular but better.
106
u/Nooodleboii Oct 27 '25
As someone who has used both professionally. I have never noticed any difference. As I understand the biggest difference is that podman is backed by red hat and integrates with a number of their products.
12
u/Zettinator Oct 27 '25 edited Oct 27 '25
There are very significant differences when it comes to uid namespacing, networking, volumes and various other parts. If you didn't notice any differences, you didn't actually use much of the tools.
Compatibility between Docker and podman is quite limited for non-trivial use cases. It's still sometimes advertised as a drop-in replacement for Docker. It really isn't.
1
u/ReleaseTThePanic Oct 27 '25
Could you give an example how that might be a problem?
6
u/Zettinator Oct 27 '25
Bind mount some directory into a container with podman. A very common use case I'd argue. Since containers are rootless by default and they use subuid mapping, there's an additional thing you need to take care of (and it's often not exactly trivial).
→ More replies (2)4
u/differentiallity Oct 27 '25
Podman was originally developed by Red Hat, but they donated it along with Podman Desktop to the CNCF and it was accepted as a Sandbox project. This was a huge selling point to me since it protects the FOSS status.
It's also much easier (in my experience) to convince an obstinate IT department to let you use Podman since it's daemonless and rootless by default.
2
u/natermer Oct 27 '25
I have never noticed any difference.
I have.
The biggest difference that I experienced is that in early versions of Kubernetes the Docker Daemon presented a fairly severe API choke point which limited the number of small containers you could effectively run on a single system image.
However most of these problems have been solved. Nowadays Kubernetes container stuff has been commoditized so it is very rare that you need to worry about what you are using "in the background".
As I understand the biggest difference is that podman is backed by red hat and integrates with a number of their products.
It came from Redhat originally as part of "libpod", which has since been subsumed into podman.
The idea is that they wanted to have containers be a first class component of Linux operating systems. They choose to be compatible with docker containers for the same reason that GNU/Linux early days choose to be compatible with POSIX.... because that is where all the applications were.
The problem with Docker is that they wanted to have containers all focused around their Docker Daemon, which they could monetize and build their tools/ecosystems around.
It is a similar situation with Xen or Virtualbox versus Linux KVM.
Nowadays, just like with Linux KVM, you have "podman containers" pretty much by default. All the parts are integrated into Linux distributions and systemd by default. You just have to install the tools to manage them.
That is if you have a typical Linux distro installed you probably have almost everything you need to use podman.
The advantage to using docker nowadays is mostly around documentation and discoverability. When you go read documentation on how to install applications and containers it is almost always going to be "first step: install docker".
It has been a while since I ran into situations were I couldn't translate docker deployments into something that can work perfectly well on podman. It is just that docker offers a lower barrier of entry to most users.
1
u/nicman24 Oct 27 '25
Do Nvidia and AMD cards work?
2
u/hadrabap Oct 27 '25
NVIDIA compute (CUDA) works well. You need to install nvidia-container-toolkit to get the CDI. Next, you annotate the container in question and the CDI bind-mounts all the .SOs etc. It works great.
Bear in mind that you need to to recreate your containers after each NVIDIA driver upgrade (and CDI refresh) to get new stuff mounted. The CDI generates the mounts and they become "baked" into the created container.
→ More replies (1)0
Oct 27 '25
[deleted]
37
u/themuthafuckinruckus Oct 27 '25
Also: quadlets are really freaking cool
27
u/daYnyXX Oct 27 '25
Definitely. This is the killer feature for me. Native systemd support and very readable configuration files. The generator also lets you see errors in your quadlet file.
→ More replies (3)10
u/Business_Reindeer910 Oct 27 '25
I i really wish you could have the quadlet configs LIVE in the project. having to copy them elsewhere makes them not great for development. The one nice thing about docker-compose is that it just works right there in the project directory.
→ More replies (5)3
u/EvaristeGalois11 Oct 27 '25
I dont think quadlets are an alternative to docker compose, you usually install them with a script or something like Ansible/Puppet.
For local development you can still use docker compose files (although the compatibility is pretty hit or miss) or the much better alternative kubernetes yaml files.
→ More replies (3)136
Oct 27 '25
[removed] — view removed comment
26
u/Oborr Oct 27 '25
I want to switch but my Docker containers are set up with docker-compose and the Podman equivalent isn't remotely close to being compatible.
Is there an easy way to migrate over?
46
u/deviled-tux Oct 27 '25
You just enable the Podman socket, set DOCKER_HOST and use regular docker-compose
→ More replies (12)3
u/CoreParad0x Oct 27 '25
I’ve been considering switching for a while. Do you just run your stuff as one user per app/stack, or do you make a user for each? As in if I have 4 distinct apps running in docker, is it usually all just run under 1 user with podman, or 4?
7
u/kabinja Oct 27 '25
I think it is because the podman philosophy is very different. The way I migrated my docker composé to podman was using Ansible and quadlet. Not saying that you should go that road but I am personally really happy I did.
5
u/inevitable-publicn Oct 27 '25
This! Quadlets are in every way superior. And I also use this with ansible.
→ More replies (1)5
u/arades Oct 27 '25
There's a couple options: Podman-compose is meant to be a drop in replacement, and if you have it installed, podman can use it as a compose provider, meaning you can use it directly through podman like
podman compose. That also makes it broadly compatible with aliasing podman as docker. Not every part of compose is implemented, and it's somewhat common that you need to edit parts of a docker-compose.yaml to make things work rootlessly.Podlet is a migration tool. Podlet can read in docker-compose files and output systemd units (quadlets) which are the more idiomatic replacement for compose files. It gives you options for if you want to use a pod of containers, or kubernetes based units. When podlet hits something that can't translate it will give you a pretty good error message to tell you what to change.
I like the podlet approach more, the systemd units compose really nicely and make server setups just feel like you're setting up normal services. If you're not familiar with systemd already it could be more of learning curve though.
→ More replies (1)→ More replies (2)1
u/Blocikinio Oct 27 '25
SystemD: Am I joke to you?
4
u/syklemil Oct 27 '25
There's no uppercase d in
systemd.But also, no? Docker kind of started out as a nice interface to system capabilities in Linux, including stuff like cgroups and chroot.
Ultimately we probably could learn how to use
systemd-nspawnas well, but it's not particularly clear what the benefits of that are over the more common docker/podman interface. Podman, meanwhile, comes with this "you just change the first word, the rest of your habits should work!" sales pitch. There's not really much of a cost of switching in terms of habituation, much like neovim users can keep their vim habits, and typescript users can keep their javascript code.
17
u/skittle-brau Oct 27 '25
As someone who knows just enough to be dangerous, my challenge with transitioning to podman is troubleshooting services when most documentation is written with docker in mind.
I’ll admit to a degree of laziness and inertia on my part as well however.
1
u/AMidnightHaunting Oct 28 '25
From my experience years ago when Rodman first came out, the cli commands are aliased and drop in place replacements.
43
u/daYnyXX Oct 27 '25
I've been using podman for about 2 years and it is fantastic. There are few things that take getting used to (file permissions when running rootless services in rootless containers) but it also adds a bit of security and more fine grained file permissions. Quadlets are also fantastic for managing containers with systemd.
Also podman supports updating containers with podman auto-update if you have the correct labels. 10/10 feature to make sure you're always running the newest version without a secondary service.
21
u/geolaw Oct 27 '25
Running everything on podman but immich ... Probably close to 30 containers when all's said and done. Was running scrypted on docker as well but moved it recently and had some free time to tinker and got it going on podman just fine.
7
u/daYnyXX Oct 27 '25
Out of curiosity why isn't immich running on podman?
8
u/martinus Oct 27 '25 edited Oct 27 '25
It works without a problem, but you have to write 4 quadlets or so. I use it that way. I've now posted the files in this comment: https://www.reddit.com/r/linux/comments/1oh1fj7/comment/nll524i/
1
u/Rygor99 Oct 27 '25
Can you send me them?
3
u/martinus Oct 27 '25
I posted the files in this comment: https://www.reddit.com/r/linux/comments/1oh1fj7/comment/nll524i/
9
u/martinus Oct 27 '25 edited Oct 27 '25
I use Immich with podman, works nicely. I wrote some quadlets that work for me. I run all that under the user
podfather, so I put all the files into/home/podfather/.config/containers/systemd/immich/.Adaptations you might need to do:
I have all my data in
/data/podman/immich/. Search through the files and change that to your locationI use a network named
wireguard, change this to your need.In
immich-postgres.containerI've setDB_STORAGE_TYPE=HDDbecause my NAS has spinning disks.In
immich-server.containerat the end I have enabled my AMD iGPU for hardware acceleration, you might need to adapt that to your system.env
# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables # The location where your uploaded files are stored UPLOAD_LOCATION=./library # The location where your database files are stored. Network shares are not supported for the database DB_DATA_LOCATION=./postgres # To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List # TZ=Etc/UTC # The Immich version to use. You can pin this to a specific version like "v1.71.0" IMMICH_VERSION=release # Connection secret for postgres. You should change it to a random password # Please use only the characters `A-Za-z0-9`, without special characters or spaces DB_PASSWORD=postgres # The values below this line do not need to be changed ################################################################################### DB_USERNAME=postgres DB_DATABASE_NAME=immichimmich.pod
[Pod] PodName=immich PublishPort=2283:2283 Network=wireguard [Install] WantedBy=default.targetimmich-machine-learning.container
[Container] ContainerName=immich_machine_learning Pod=immich.pod Image=ghcr.io/immich-app/immich-machine-learning:release AutoUpdate=registry EnvironmentFile=.env Volume=/data/podman/immich/model-cache:/cache:Z HealthCmd=["/bin/bash", "-c", "exec 5<>/dev/tcp/127.0.0.1/3003"] HealthStartPeriod=30s HealthInterval=10s HealthTimeout=5s HealthRetries=5immich-postgres.container
[Container] ContainerName=immich_postgres Pod=immich.pod # I just removed the sha hash, see https://github.com/immich-app/immich/releases/ docker-compose.yml Image=ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0 AutoUpdate=registry Environment=POSTGRES_PASSWORD=postgres Environment=POSTGRES_USER=postgres Environment=POSTGRES_DB=immich Environment=POSTGRES_INITDB_ARGS=--data-checksums # Uncomment the DB_STORAGE_TYPE: 'HDD' var if your database isn't stored on SSDs Environment=DB_STORAGE_TYPE=HDD # HealthCmd=pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" || exit 1; Chksum="$$(psql --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" --tuples-only --no-align --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo "checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1 # HealthStartPeriod=30s # HealthInterval=5m # HealthStartupInterval=30s Volume=/data/podman/immich/postgres:/var/lib/postgresql/data:Zimmich-redis.container
[Container] ContainerName=immich_redis Pod=immich.pod # I just removed the sha hash, see https://github.com/immich-app/immich/releases/ docker-compose.yml Image=docker.io/valkey/valkey:8-bookworm AutoUpdate=registry HealthCmd=redis-cli ping || exit 1 HealthStartPeriod=30s HealthInterval=5m HealthStartupInterval=30simmich-server.container
[Unit] # Correctly specify dependencies, see https://www.freedesktop.org/software/systemd/man/257/systemd.unit.html#Requires= Requires=immich-redis.service immich-postgres.service After=immich-redis.service immich-postgres.service [Container] ContainerName=immich_server Pod=immich.pod Image=ghcr.io/immich-app/immich-server:release AutoUpdate=registry Environment=DB_HOSTNAME=immich_postgres Environment=REDIS_HOSTNAME=immich_redis EnvironmentFile=.env Volume=/data/podman/immich/library:/usr/src/app/upload:Z Volume=/etc/localtime:/etc/localtime:ro # from "getent group render" # see https://jellyfin.org/docs/general/post-install/transcoding/hardware-acceleration/amd/ GroupAdd=105 # getent group video GroupAdd=39 AddDevice=/dev/dri/renderD128:/dev/dri/renderD1282
1
10
u/NegativeOwl9929 Oct 27 '25
Compose is a missing feature is DNS. If container has more than 1 nics it xanot find the others easy like docker. There must be use FQDN instead of set an alias of the nics as at docker compose case.
18
u/ABotelho23 Oct 27 '25
Quadlets are the best thing ever.
5
u/hyper9410 Oct 27 '25
There is a learning curve to it though. especially converting a docker compose file to a rootless quadlet is not easy the first few times.
I wish there would be more tutorials for that. having different networks between containers within a pod is not usually how you would find docker compose configurations.
I'm aware that it might not be necessary, but a DB only talking to the application within a pod, and not having the proxy be able to access the DB port within the same quadlet pod is good.
6
u/ThinkingWinnie Oct 27 '25
Search for "podlet" on github, it does most of the work of converting a compose file to a quadlet.
1
u/reallyserious Oct 27 '25
What's that?
2
u/hyper9410 Oct 27 '25
It is in a way how podman runs a composefile as systemd daemons.
You create several files which defines the pod/containers in a kubernetes style yaml and a systemd configuration file.
This way you can use systemd to let them run under a specific user rootless controlled by systemd.
6
u/Isofruit Oct 27 '25 edited Oct 27 '25
I have a project of mine entirely in docker and did try out podman + podman compose as a drop-in replacement. Turns out that in terms of build-time of images it is a decent chunk slower than docker-compose. Enough to very much notice and decide against it. I was surprised at how complete a replacement it is though and how easy the process of dropping it in was.
1
u/jeppester Oct 27 '25
The trick is to use the standalone version of docker compose with podman socket. I've been doing that for years and it works great
6
u/hoselorryspanner Oct 27 '25
I wish postman output was colourised. Maybe there’s a way of turning it on, I haven’t bothered to find out. But it’s really irritating (not enough to do anything about mind)
4
u/AFCMS Oct 27 '25
Theorically better because of a better rootless mode, but lacks many advanced features I use from Docker (like compose watch).
Don't think I will be able to switch any time soon.
3
u/ThinkingWinnie Oct 27 '25
My migration was 20 times easier thanks to this tool which amongst other things, converts a docker compose to a quadlet:
https://github.com/containers/podlet
Still has a learning curve, but easier to get going with compared to writing em from scratch yourself as a beginner.
6
u/Kolawa Oct 27 '25
podman is slower, and has quirks that make it annoying to migrate dockerfiles and docker composes to. but otherwise it's solid.
2
2
2
u/EizanPrime Oct 27 '25
You can use both at the same time, and most of the problems with docker can be solved with docker rootless.
I hate docker as much as the next guy, but better to keep docker installed on your system for when you need it, which is quite often tbh
1
u/MarcCDB Oct 27 '25
Can you use full Docker Compose files already? I remember there were issues with it.
1
u/NatoBoram Oct 27 '25
When I tried to switch, it didn't support Docker secrets and mount points. It's been a while, but I'll try it sometime later when I get another phase. Not sure when that'll be.
1
u/mralanorth Oct 28 '25
Yep, feels way better and more Linux-y than Docker. I've been using Podman for years.
1
u/FryBoyter Oct 28 '25
I tried podman yesterday and encountered two problems.
When attempting to convert an existing Composer file from Docker to Quadlet files using podlet, I received a rather meaningless error message about a missing name. I was able to fix the problem by entering a project name (https://docs.docker.com/reference/compose-file/version-and-name/#name-top-level-element) in the Composer file.
After the Quadlet files were generated and imported, I wanted to start the systemd services. This caused problems with subuid and subgid. The problem was easily solved as described at https://wiki.archlinux.org/title/Podman#Set_subuid_and_subgid. In this case, the cause was that the user account was very old.
1
u/archontwo Oct 27 '25
I like the concept of podman but only in the context of single user systems.
The only issue I had with podman was when I was using cockpit to manage a server and a user had started a podman container which was taking up too many resources, so I login as root to the dashboard and tried to kill it but it would not let me. In the end I had to get to a shell and su - kill it.
Very irritating
2
u/hadrabap Oct 27 '25
You might consider setting CGroup limits for your users. I have limits everywhere. On my service users as well as on every container. It works really well.
1
u/archontwo Oct 28 '25
This was a few years back, so things might have improved.
Still adding another layer of user management above groups is tiresome if necessary.
1
u/voxadam Oct 27 '25
It sounds like your issue is with Cockpit, not Podman. Did you file a bug report or feature request?
171
u/28874559260134F Oct 27 '25 edited Oct 27 '25 •
The daemonless (+rootless) nature of Podman and the fact that you can use most docker commands and habits while operating caused me to switch back then. Their Podman desktop setup (if one prefers a GUI) also is miles ahead of the approach Docker used for their Docker Desktop on Linux variant, which uses a VM (on Linux!), in turn creating all kinds of issues, esp. with heavy IO tasks. (that VM makes sense on others OSes of course, but not on Linux)
In actual use, you do encounter some slight differences when just going directly with docker-based tutorials and setups, but nothing should break your system or prevent you from achieving your goals.
Still, it makes sense to investigate possible issues beforehand if you happen to use more advanced features with your current Docker-based creations. For the average user though, just wanting to get some containers going and perhaps also looking for a nice GUI option, Podman really is something worth checking out.
I never looked back after switching.
Edit: added "rootless" since it matters a lot