Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NodeJS exec with Docker – the input device is not a TTY

I wrote a script that let the user choose the command that will be executed in shell. For that I used child-process-promise library – a code for running a command can be simplified to this:

import Process from 'child-process-promise';

const test = async () => {
  await Process.exec('docker run --rm --tty --interactive ...');
};

test();

All would be okay, but I'm getting stderr like:

the input device is not a TTY\nmake: *** [display_status] Error 1\n

What am I doing wrong here?

like image 520
mdmb Avatar asked Feb 04 '26 22:02

mdmb


1 Answers

As suggested in this other post removing the -t/--tty flag should resolve the issue.

like image 65
SebKas Avatar answered Feb 06 '26 12:02

SebKas