5

Here's part of my dockerfile:

FROM ubuntu:16.04

#ubuntu:lastest

RUN apt-get update

COPY Anaconda3-4.4.0-Linux-x86_64.sh /root/

WORKDIR /root/

RUN bash Anaconda3-4.4.0-Linux-x86_64.sh

RUN conda upgrade --all

...

during the installation process of Anaconda(bash Anaconda3-4.4.0-Linux-x86_64.sh), there is a license needs agreement, which needs me to answer 'yes',

install confirm

but when it's run in dockerfile, it shows like this, like keep pressing ENTER, how can I skip this confirm or input 'yes'

romlym
  • 561
  • 1
  • 7
  • 26
  • 1
    check this https://stackoverflow.com/questions/34644612/conda-silently-installing-a-package?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa – Vico Apr 08 '18 at 04:47
  • @Vico thanks dude, but not the same question – romlym Apr 08 '18 at 06:27
  • 1
    There is an anaconda image provided by continuumio on the Docker Hub here https://hub.docker.com/r/continuumio/anaconda/~/dockerfile/. You can use this image, or you can check how they install in their Dockerfile. ```RUN wget --quiet https://repo.continuum.io/archive/Anaconda2-5.1.0-Linux-x86_64.sh -O ~/anaconda.sh && \ /bin/bash ~/anaconda.sh -b -p /opt/conda && \ rm ~/anaconda.sh && \ ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \ echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \ echo "conda activate base" >> ~/.bashrc ``` – takacsmark Apr 08 '18 at 08:00
  • @Mark thanks, I will try that – romlym Apr 08 '18 at 08:25
  • 3
    Agree that this is a different question. For other that stumble upon this later, the answer is `$ sh ancanda_installer.sh -b` -- the `-b` is for "batch mode". – keithpjolley Feb 13 '19 at 07:13

0 Answers0