dockerfile中遇到需要輸入yes 或 y時(shí) 怎么辦
比如 sh install.sh 執(zhí)行過程中需要鍵盤輸入 :
yes,Enter
#可以使用/bin/echo -e 輸入
#有的輸入"y" 有的輸入"yes", 直接更改/bin/echo -e后內(nèi)容就行
#例如:
RUN sh -c '/bin/echo -e "y\n" | sh install.sh'
RUN sh -c '/bin/echo -e "yes\n" | sh install.sh'