Dockerfile-如何将答案传递给apt-get安装提示? [英] Dockerfile - How to pass an answer to a prompt post apt-get install?

查看:196
本文介绍了Dockerfile-如何将答案传递给apt-get安装提示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

In my Dockerfile, I am trying to install jackd2 package:

RUN apt-get install -y jackd2

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

It installs properly, but after installation, I can see the following prompt:

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]

```

在这一点上,我想回答是或否,按Enter键并继续,但是我不知道如何在dockerfile中编写脚本,而我的构建就挂在那里。

At this point, I would like to answer with either yes or no, hit enter and move on but I have no idea how to script this inside a dockerfile and my build hangs right there.

推荐答案

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

This answer has an explanation for the difference between "assume yes" and a non-interactive mode.

我还找到了一个示例一个在此处处安装jackd2的Dockerfile,并且设置 DEBIAN_FRONTEND 'noninteractive',然后安装jackd2。

I also found an example of a Dockerfile that installs jackd2 here, and it's setting DEBIAN_FRONTEND to 'noninteractive' before installing jackd2.

这篇关于Dockerfile-如何将答案传递给apt-get安装提示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆