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 parse_git_branch fail ONLY in Docker terminal window
  • Running docker shell on Windows
  • Unable to connect to Jupyter Notebook served by Docker
  • How to avoid undesired “animated” console output on Jenkins
  • User-data script not executed when starting EC2 instance from AWS CLI
  • docker - cannot find aws credentials in container although they exist
  • Update source-code:

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

    RUN wget -q
    RUN tar -xzf RevoMath-3.2.4.tar.gz
    RUN cd RevoMath/
    RUN ./

    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!

  • How to enable MongoDB access control using a Docker container?
  • Installing SQL alongside a new ASP.Net Core project in Docker
  • What does the task hierarchy mean in 'docker node ps' output?
  • Dockerfile Overriding ENV variable
  • Recommend way to Artisan on Docker
  • Create long running .NET Core service targeting Linux Docker container
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.