How to run command during Docker build which requires a tty?

前端 未结 3 902
清酒与你
清酒与你 2021-01-12 15:49

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

3条回答
  •  逝去的感伤
    2021-01-12 16:26

    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

提交回复
热议问题