`podman-compose ps` does not accept service as parameter
Is your feature request related to a problem? Please describe.
When attempting to extend CI workflow that works with docker-compose to also run with podman-compose, any incompatibility and missing options on podman-compose side lead to wasted time coming up with workarounds.
Describe the solution you'd like
To check if a service is running, I'd like to be able to specify service name as a parameter to podman-compose ps, as I can do with docker-compose ps:
$ docker-compose ps --help
Usage: docker compose ps [OPTIONS] [SERVICE...]
[...]
$ docker-compose up -d
[+] Running 3/3
✔ Network test-docker-compose_default Created 0.1s
✔ Container test-docker-compose-frontend-2-1 Started 0.3s
✔ Container test-docker-compose-frontend-1-1 Started 0.3s
$ docker-compose ps frontend-1
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
test-docker-compose-frontend-1-1 docker.io/library/nginx "/docker-entrypoint.…" frontend-1 10 seconds ago Up 9 seconds 0.0.0.0:8081->80/tcp, [::]:8081->80/tcp
Currently (with podman-compose 1.5.0) I get
$ podman-compose ps frontend-1
usage: podman-compose [-h] [-v] [--in-pod in_pod] [--pod-args pod_args]
[--env-file env_file] [-f file] [--profile profile]
[-p PROJECT_NAME] [--podman-path PODMAN_PATH]
[--podman-args args] [--podman-pull-args args]
[--podman-push-args args] [--podman-build-args args]
[--podman-inspect-args args] [--podman-run-args args]
[--podman-start-args args] [--podman-stop-args args]
[--podman-rm-args args] [--podman-volume-args args]
[--no-ansi] [--no-cleanup] [--dry-run]
[--parallel PARALLEL] [--verbose]
{help,version,wait,systemd,pull,push,build,up,down,ps,run,exec,start,stop,restart,logs,config,port,pause,unpause,kill,stats,images} ...
podman-compose: error: unrecognized arguments: frontend-1
Describe alternatives you've considered
My current approach is
$ podman-compose ps --format json | jq -r --arg service frontend-1 '.[].Labels["com.docker.compose.service"] | select(. == $service)'
which is quite a mounthful. Plus the fact that the JSON output of podman-compose vastly differs from the one of docker-compose makes that approach not compatible with docker-compose either.
Additional context
I'm currently hitting this incompatibility when working on https://github.com/adelton/webauthinfra.