1

I am using docker container on Linux Mint host machine to run PHPUnit tests, like this:

docker run -t -i  --volume=$PWD:/var/www username/phpunit:v1 --stderr tests/

PHPUnit 4.8.3 by Sebastian Bergmann and contributors.

..........

Time: 1.18 seconds, Memory: 11.25Mb

So, this works fine. My next step was to create File Watcher inside IDE(PHPStorm), so that this docker command is run every time some of the test files change. However, when IDE runs the command, instead of getting the output like above, what I get is this error mesage:

cannot enable tty mode on non tty input

Looks like this is happening a lot on Windows machines, but I couldn't find what causes this issue on Linux. Is there a way to fix this ?

Zed
  • 5,683
  • 11
  • 49
  • 81

1 Answers1

0

You are running the command from an IDE, which most probably isn't a terminal. So you might want to remove the -t parameter from the command:

docker run -i  --volume=$PWD:/var/www username/phpunit:v1 --stderr tests/

Find a more detailed answer here.

Community
  • 1
  • 1
Stéphane Bruckert
  • 21,706
  • 14
  • 92
  • 130