How to workaround “the input device is not a TTY” when using grunt-shell to invoke a script that calls docker run?

后端 未结 2 1736
刺人心
刺人心 2020-12-29 20:02

When issuing grunt shell:test, I\'m getting warning \"the input device is not a TTY\" & don\'t want to have to use -f:

$ grunt          


        
2条回答
  •  盖世英雄少女心
    2020-12-29 20:47

    Remove the -t from the docker run command:

    docker run $RUN_ENV_FILE -i --rm --user node -v "$PWD":/app -w /app yaktor/node:0.39.0 $@
    

    The -t tells docker to configure the tty, which won't work if you don't have a tty and try to attach to the container (default when you don't do a -d).

提交回复
热议问题