"php" is the name of my service, "./composer.phar --no-suggest install" is my command. Composer finishes with no complaints, but for some reason the exit code is non-zero. I could not find anything online, except that the parent's exit code is 128 + child exit code, so the exit code may be 1 or 129.
I am able to work around the issue with the following (no -t option):
docker exec -i project_php_1 bash -c "./composer.phar --no-suggest install"
use -T to disable TTY allocation.
Most helpful comment
use
-Tto disable TTY allocation.