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.

  • Why does my Dockerfile CMD not work?
  • Dockerfile - How to pass an answer to a prompt post apt-get install?
  • Docker - Execute a bash when running a container
  • Command line shortcut to connect to a docker container [closed]
  • docker current not installed - bash on ubuntu on windows 10
  • How to check if docker daemon is running?
  • 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!

  • should I run composer install inside my docker build
  • Docker Build: xz(stdin): File format not recognized
  • Sign-in Sign-up form with Node+MySql Docker Container
  • Docker not running/showing long-running processes
  • gulp watch seems to freeze in Docker
  • Docker API can’t apply json filters
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.