Send keystroke to Dockerfile, Ubuntu

I’m creating Dockerfile script and it has a command line that executes a program and requires user input 1 from keyboard as selected option to go to further steps.

Xdotool, man yes or expect cannot help in this situation.

  • How to substitute variable value in “docker run” command
  • Unable to install docker
  • Why does “docker run” error with “no such file or directory”?
  • Installation of OpenFOAM throws read-only file system error while using Docker
  • Stop Solr gracefully when it running in docker
  • How to run an application inside docker safely
  • Update source-code:

    First off, download and extract RevoMath library, navigate to RevoMath folder then execute the install script.

    
    ...
    RUN wget -q https://mran.microsoft.com/install/mro/3.2.4/RevoMath-3.2.4.tar.gz
    RUN tar -xzf RevoMath-3.2.4.tar.gz
    RUN cd RevoMath/
    RUN ./RevoMath.sh
    ...
    
    

    Install script has some select options as follow:

    
    echo "1. Install MKL"
    echo "2. Uninstall MKL"
    echo "3. Exit utility"
    

    We need to enter 1 from keyboard to install. How can we do it via Docker command?

    Any help would be appreciated!

  • Want to ssh into a running docker container running inside CentOs Image
  • docker postgres with initial data is not persisted over commits
  • How to send network packets to the docker container?
  • “No such file or directory” what's wrong in this Dockerfile?
  • Exception on reloading remote spring boot application with Intellij IDEA
  • Incorrect memory accounting when using tmpfs volume
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.