I have some script I need to run during a Docker build which requires a tty (which Docker does not provide during a build). Under the hood the script uses the read
You don't need a tty for feeding your data to your script . just doing something like (echo yes; echo no) | myscript.sh as you suggested will do. also please make sure you copy your file first before trying to execute it . something like COPY myscript.sh myscript.sh