containers / containers/podman-compose

podman-compose up does not support Docker Compose --no-attach option

Open
#1,490 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
6.2k
Forks
622
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

`podman-compose up` rejects Docker Compose's documented `--no-attach SERVICE` option as an unrecognized argument.

This appears to be a Docker Compose CLI compatibility issue in `podman-compose`, not a Podman runtime issue. Docker Compose documents `--no-attach SERVICE` for [`docker compose up`](https://docs.docker.com/reference/cli/docker/compose/up/), and the option can be repeated to suppress logs from selected services while keeping the Compose stack attached.

**To Reproduce**

1. Create a minimal `docker-compose.yml`:

```yaml
services:
app:
image: busybox:latest
command: sh -c "while true; do echo app; sleep 2; done"

worker:
image: busybox:latest
command: sh -c "while true; do echo worker; sleep 2; done"
```

2. Run `podman-compose up` with `--no-attach`:

```sh
podman-compose up --no-attach worker
```

Or, when `docker compose` is routed to `podman-compose`, run:

```sh
docker compose up --no-attach worker
```

**Expected behavior**

`podman-compose` should accept the `--no-attach worker` argument and start both services, while only attaching logs for `app`.

This should match [Docker Compose behavior](https://docs.docker.com/reference/cli/docker/compose/up/), where `--no-attach SERVICE` is a supported `up` option and may be repeated for multiple services.

**Actual behavior**

`podman-compose` exits before starting the services because it does not recognize the `--no-attach` option.

**Output**

```text
$ podman-compose version
podman version 5.7.0
podman-compose version 1.5.0

$ podman --version
podman version 5.7.0

$ docker compose --profile dev up --remove-orphans --no-attach db --no-attach valkey --no-attach rustfs --no-attach rustfs-setup
podman-compose: error: unrecognized arguments: --no-attach --no-attach valkey --no-attach rustfs --no-attach rustfs-setup
Error: executing /home/niklas/.local/bin/podman-compose --profile dev up --remove-orphans --no-attach db --no-attach valkey --no-attach rustfs --no-attach rustfs-setup: exit status 2
```

**Environment:**

- OS: Linux
- podman version: 5.7.0
- podman compose version: 1.5.0

**Additional context**

The equivalent Docker Compose command supports this use case with repeated `--no-attach SERVICE` arguments.

Contributor guide

Open the contributing guide

Research direction

Start with the argument handling for the `podman-compose up` command and reproduce the issue using the minimal `docker-compose.yml` from the report. Verify repeated `--no-attach SERVICE` arguments, then run `podman-compose up --no-attach worker` and confirm both services start while only `app` logs are attached.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
cli, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
70/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.