-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
Description
Description
docker-compose will error with a misleading message when stdin is not a TTY but stdout is a TTY, and stdin_open: true. docker doesn't have this problem.
Steps To Reproduce
compose.yaml:
services:
main:
image: debian:trixie
command: ['cat']
stdin_open: trueecho a | docker-compose run --rm main | cat
You will get anaas output.echo a | docker-compose run --rm main
I expect to get anaas output, becauseecho a | docker run -i --rm debian:trixie catalso outputs ana. But I gotthe input device is not a TTY, which is misleading --- I did not ask for a TTY, why isdocker-composecomplaining the input device not being a TTY? And it's very hard to guess that the actual problem is related to stdout (being a TTY), not stdin.
Compose Version
# docker compose version
Docker Compose version 2.26.1-4
# docker-compose version
Docker Compose version 2.26.1-4
Docker Environment
Client:
Version: 26.1.5+dfsg1
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: 0.13.1+ds1
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: 2.26.1-4
Path: /usr/libexec/docker/cli-plugins/docker-compose
...
Kernel Version: 6.12.43+deb13-amd64
Operating System: Debian GNU/Linux 13 (trixie)
...
Anything else?
No response