Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dockerfile - How to pass an answer to a prompt post apt-get install?

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]

```

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.

like image 280
Paweł Duda Avatar asked Sep 02 '25 04:09

Paweł Duda


1 Answers

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

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

like image 196
Roman Avatar answered Sep 04 '25 23:09

Roman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!