Skip to content

cgroup: host is silently ignored by podman-compose provider #1439

@mp1-tomclancy

Description

@mp1-tomclancy

Describe the bug
The service cgroup option (see https://docs.docker.com/reference/compose-file/services/#cgroup) is ignored by podman-compose

To Reproduce

compose.yml:

services:
  test:
    image: docker.io/library/busybox:1.37.0
    container_name: cgroup-test
    command: sleep infinity
    privileged: true
    cgroup: host

Run with docker-compose:

$ PODMAN_COMPOSE_PROVIDER=docker-compose podman compose up -d
...
$ podman inspect cgroup-test | jq '.[0].HostConfig.CgroupMode'
"host"
$ PODMAN_COMPOSE_PROVIDER=docker-compose podman compose down
...

Run with podman-compose:

$ PODMAN_COMPOSE_PROVIDER=podman-compose podman compose up -d
...
$ podman inspect cgroup-test | jq '.[0].HostConfig.CgroupMode'
"private"
$ PODMAN_COMPOSE_PROVIDER=podman-compose podman compose down
...

Expected behavior

The container should be created in the host's cgroup namespace (like docker-compose)

Actual behavior

The container is created in an isolated cgroup namespace

Environment:

$ podman-compose version
podman-compose version 1.5.0
podman version 5.8.1

$ podman version
Client:        Podman Engine
Version:       5.8.1
API Version:   5.8.1
Go Version:    go1.26.1
Built:         Thu Mar 12 00:31:04 2026
Build Origin:  brew
OS/Arch:       darwin/arm64

Server:       Podman Engine
Version:      5.8.1
API Version:  5.8.1
Go Version:   go1.25.7 X:nodwarf5
Git Commit:   c6077f645788743258a1a749f8005b4fb3cbe533
Built:        Wed Mar 11 11:00:00 2026
OS/Arch:      linux/arm64

Additional context

I'm using a Lima VM with the podman-rootful template, in order to do integration testing against k0s.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions