Error on docker command in a exec child_process


I have tried to exec an docker command on a electron app but it dont work. Here is the error:

exec error: Error: Command failed: docker exec -it 6bec55e9e86e touch casa.html
the input device is not a TTY

Here is the code:

var exec = require('child_process').exec;

exec('docker exec -it 6bec55e9e86e touch casa.html', function (error, stdout, stderr) {
  console.log('stdout: ' + stdout);
  console.log('stderr: ' + stderr);
  if (error !== null) {
    console.log('exec error: ' + error);