Use STDIN during docker build from a Dockerfile

I’m trying to install Miniconda in a docker image as a first step, right now this is what I have:

    FROM ubuntu:14.04
RUN apt-get update && apt-get install wget
RUN wget *miniconda download URL* && bash

When I try to build the image, it goes well until it starts popping the following message continously:
>>> Please answer ‘yes’ or ‘no’
At that point I need to stop docker build. How can I fix it? Should I include something in the dockerfile?

  • Livereload of ionic 2 with docker-compose instance does not work
  • Performance and reliability when using multiple Docker containers VS standard Node cluster
  • New version of postgresql docker container doesn't have the new added data
  • Taking files off a docker container
  • Cassandra docker - unable to connect through JMX
  • Docker inside VirtualBox
  • TLS error when using docker-machine driver digitalocean
  • How can you run a Docker container if it doesn't exist yet, or start it if it does?
  • AWS EC2 Container Service Container Id, what does this mean?
  • how to change docker work_dir on CoreOS
  • Docker container file permission changing Automatically
  • How to make my docker run on a specified linux kernel version?
  • 2 Solutions collect form web for “Use STDIN during docker build from a Dockerfile”

    I believe you can pass -b flag to miniconda shell script to avoid manual answering

    Installs Miniconda3 4.0.5
        -b           run install in batch mode (without manual intervention),
                     it is expected the license terms are agreed upon
        -f           no error if install prefix already exists
        -h           print this help message and exit
        -p PREFIX    install prefix, defaults to $PREFIX

    something like that:

    RUN wget -O
    RUN chmod +x \
        && bash ./ -b

    You can’t attach interactive tty during image build. If it is asking for ‘yes’ or ‘no’ during package installation, wget in your case, you can replace the corresponding line with RUN apt-get update -qq && apt-get install -y wget. If it is bash, check if accepts ‘yes’ or ‘no’ as a command line argument.

    If doesn’t have that option, create a container from ubuntu:14.04 image, install wget and run your commands manually there. Then, you can make an image of the container by committing your changes like: docker commit <cotainer_id> <image_name>.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.