TTYを使用せずにexecを実行
解決
-T
オプションを付与する
... docker-compose exec -T rails ...
The input device is not a TTY · Issue #5696 · docker/compose
事象
$ find ./test -name *_test.rb | egrep 'form|model' | xargs -I _test_ docker-compose exec rails rails test _test_
を実行したところ the input device is not a TTY
が発生した。