Dockerfile – 如何将答案传递给提交后apt-get安装?

在我的Dockerfile中,我试图安装jackd2软件包:

RUN apt-get install -y jackd2 

它安装正确,但安装后,我可以看到以下提示:

 If you want to run jackd with realtime priorities, the user starting jackd needs realtime permissions. Accept this option to create the file /etc/security/limits.d/audio.conf, granting realtime priority and memlock privileges to the audio group. Running jackd with realtime priority minimizes latency, but may lead to complete system lock-ups by requesting all the available physical system memory, which is unacceptable in multi-user environments. Enable realtime process priority? [yes/no] 

“`

在这一点上,我想回答是或不是,打回车,继续前进,但我不知道如何在docker文件中编写脚本,我的构build挂在那里。

这个答案解释了“假设是”和非交互模式之间的区别。

我还发现了一个在这里安装jackd2的Dockerfile的示例,在安装jackd2之前将DEBIAN_FRONTEND设置为'noninteractive'