in reply to Docker Container Started With Docker-Compose and <STDIN>
this is relevant Detecting interactive/non-interactive shell.