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?

  • Which java 8 docker image contains jmap?
  • Unable to install node 7.5.0
  • Kubernetes Pod Creation Speed
  • Broadcasting UDP from within a Docker container
  • How to .bashrc for root in Docker
  • Files generated through docker-compose run web rails g controller do not have permissions to edit
  • Restrict ssh user to their respective docker container
  • AWS EB Deploy shows missing after deploying
  • How can I make docker-machine create a VM in a specific location
  • Running a Docker container on AWS Elastic Beanstalk - 502 Bad Gateway nginx/1.6.2
  • Docker start privileged?
  • How to setup a RabbitMQ cluster on Docker Cloud?
  • 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.