Rootfull podman compose broken on fedora?

Hi,
is there a known issue with podman compose running as root ?
A simple helloworld compose file can be started properly with podman rootless, but it fails when running as root :confused:
I’m on silverblue 42.

sudo podman compose config
>>>> Executing external compose provider "/usr/local/lib/docker/cli-plugins/docker-compose". Please see podman-compose(1) for how to disable this message. <<<<

name: test-parent-dirs
services:
  hello:
    image: quay.io/podman/hello:latest
    networks:
      default: null
networks:
  default:
    name: test-parent-dirs_default
sudo podman compose up
>>>> Executing external compose provider "/usr/local/lib/docker/cli-plugins/docker-compose". Please see podman-compose(1) for how to disable this message. <<<<

unable to get image 'quay.io/podman/hello:latest': Cannot connect to the Docker daemon at unix:///run/podman/podman.sock. Is the docker daemon running?
Error: executing /usr/local/lib/docker/cli-plugins/docker-compose up: exit status 1

With fedora 41 it used to work.
Running without compose is also working

sudo podman run --rm hello-world
Resolved "hello-world" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf)
Trying to pull quay.io/podman/hello:latest...
Getting image source signatures
Copying blob 81df7ff16254 done   | 
Copying config 5dd467fce5 done   | 
Writing manifest to image destination
!... Hello Podman World ...!
...

:link: Enabling composefs by default for Atomic Desktops

I’m not sure these are related. Can you elaborate on why the new composefs feature is preventing podman compose to work ?

Can you share your rpm-ostree status?

Looks like podman compose is handing off to docker compose to execute. I’m assuming you have docker installed?

Your sudo test is using podman. What happens if you try docker run?

From the error it seems likely that you need to systemctl enable --now podman.socket, by default its disabled.

1 Like

@jtognazzi think if podman uses composefs it also has something to do with … I do understand it as barry, you have to make changes to be able to use it as it was before.

As podman also use composefs to store containers layers, this enable deduplication of files between containers and host. This will result in less disk usage but also faster container startup and less memory use. See Add shared library/tool for managing backing store files · Issue #125 · composefs/composefs · GitHub

podman.socket is already enabled and working.
I can use podman as root.
but I cannot use podman compose as root !

I think the issue is that I’m using the docker compose plugin (/usr/local/lib/docker/cli-plugins/docker-compose) and probably it is not compatible with the new composefs feature

Ok, I cleaned up my system a little as I had several version of the docker-compose plugin installed.
I removed them all and install the podman-compose package.
With it, the podman compose commands can be run as root.

So it seems that the culprit is the docker-compose plugin !

2 Likes

I don’t have docker installed, but I have the docker-compose plugin installed and that was the one used for podman compose. It also seems to be the issue see my reply below

1 Like