BackstopJS: Docker - the input device is not a TTY

I’m trying to run my tests on a TFS build. However, I got the following error:

the input device is not a TTY

I know that this is related to -it flag on docker run command, but I’m afraid that i cannot remove this flag without submitting a PR (I dont know why backstop uses -it also) and I cannot activate tty on the server in which TFS is running.

Any ideas about that?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 4
  • Comments: 17 (9 by maintainers)

Most upvoted comments

Yes, definitely.

I actually was thinking in trying something like this:

"dockerOptions": { "args": ["-it"] }

I agree @garris, this is the right way to do it, I’d prefer this over my PR.

No worries about the delay, I think that this approach is a great idea! It would allow for small tweaks, like the one I need to make, but also could open doors to more complex setups.

@screendriver I just installed from the fork made for #925 , and passed the option in the config.

package.json

image

backstop config

image

I have the same issue. According to the Docker docs:

Specifying -t is forbidden when the client standard output is redirected or piped, such as in: echo test | docker run -i busybox cat.

I sent a PR earlier to make docker run more customizable: #925 I fixed this particular issue by adding “-t=false” to dockerRunExtraArgs. (which is the same as using -i instead of -it) -t seems to be necessary only if we want to handle keyboard input while running in the container. Is there a use case for that?

If anyone comes up with a cleaner design, I’m more than happy to put together another pull request.