I am working on a Dockerfile and have got it to run the shell script on my Ubuntu system. However, it appears that the build fails; without docker, I would get the opportunity to answer about 11 prompts during installation. How can I make docker pause to give me the opportunity to answer the prompts? The following is an example of my file:
Using the env DEBIAN_FRONTEND=noninteractive should select the defaults without manually giving you a prompt. So, that way, your intervention is not needed during the image-building process.
All answers before me were good, but it all depends on what the prompt is. Normally you would not want to have any prompt as you are not there when a image is automatically built in a CI/CD pipeline.
If the application doesnât support any way to receiev the parameters, except interactively, that is not designed to run in containers.
Usually you can send the answers to the standard input of a command to not ask for inputs interactively, but better if it has command lines arguments for the same questions. And there is also a command called âExpectâ to help you automate interactive questions
It all depends on the app and the questions. Try @capriciousduckâs answer first, which helps if the app recognizes the variable and can work with default parameters, but not if it requires those parameters.