Merge pull request #1224 from p12tic/podman-label

Expose io.podman.compose.service label
This commit is contained in:
Povilas Kanapickas 2025-05-29 22:18:42 +03:00 committed by GitHub
commit 4c6df85efa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -0,0 +1 @@
Added `io.podman.compose.service` label to created containers. It contains the same value as com.docker.compose.service.

View File

@ -2315,7 +2315,8 @@ class PodmanCompose:
labels.extend(podman_compose_labels)
labels.extend([
f"com.docker.compose.container-number={num}",
"com.docker.compose.service=" + service_name,
f"io.podman.compose.service={service_name}",
f"com.docker.compose.service={service_name}",
])
cnt["labels"] = labels
cnt["_service"] = service_name