Skip to content

podman-system-service and docker-compose #257

@khimaros

Description

@khimaros

podman-system-service provides docker compatible API. this may be a path to full support of docker-compose with podman.

this is what works:

# apt install podman

# systemctl start podman

# apt install --no-install-recommends docker-compose

# which docker || echo "no docker installed"
no docker installed

# cat docker-compose.yml
hello-world:
  image: hello-world

# docker-compose -H unix:/run/podman/podman.sock pull
pulling hello-world ... done

# docker-compose -H unix:/run/podman/podman.sock up
Creating hello_hello-world_1 ... done
hello-world_1  | Hello from Docker!
hello_hello-world_1 exited with code 0

# podman ps -a
<shows exited container>

i've verified that this works with podman 2.0.6 and docker-compose 1.25.0 on debian bullseye.

of course, one of the appeals of podman is being able to run unprivileged. partial success:

$ systemctl start --user podman

$ docker-compose -H unix:/$XDG_RUNTIME_DIR/podman/podman.sock pull
pulling hello-world ... done

$ docker-compose -H unix:/$XDG_RUNTIME_DIR/podman/podman.sock up
ERROR: ... invalid configuration, cannot specify resource limits without cgroups v2 and --cgroup-manager=systemd

the pull was successful, and the socket is working fine:

$ podman -r images
REPOSITORY                     TAG     IMAGE ID
docker.io/library/hello-world  latest  bf756fb1ae65

$ podman -r run --rm -ti hello-world
Hello from Docker!

launching the system service with --cgroup-manager=systemd or --cgroup-manager=cgroupfs has no impact.

possibly related to containers/podman#5903

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions