我有这个dockerfile:
FROM ...
RUN apt update
RUN apt install <tool>
apt install <tool>
告诉我,我将做一些有害的事情,因此我需要写Yes, do as I say!
。当我手动执行此操作时,它将起作用。但是当我在dockerfile中执行此操作时它不起作用。我尝试过:
RUN echo "Yes, do as I say!" | apt install <tool>
和RUN yes "Yes, do as I say!" | apt install <tool>
但这没有用。如何在dockerfile中回答问题?