title: How to install packages with miniconda in Dockerfile?
body: <p>I have a simple Dockerfile:</p>
  
  <pre><code>FROM ubuntu:18.04
  
  RUN apt-get update
  
  RUN apt-get install -y wget &amp;&amp; rm -rf /var/lib/apt/lists/*
  
  RUN wget \
      https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
      &amp;&amp; mkdir /root/.conda \
      &amp;&amp; bash Miniconda3-latest-Linux-x86_64.sh -b \
      &amp;&amp; rm -f Miniconda3-latest-Linux-x86_64.sh \
      &amp;&amp; echo PATH="/root/miniconda3/bin":$PATH &gt;&gt; .bashrc \
      &amp;&amp; exec bash \
      &amp;&amp; conda --version
  
  RUN conda --version
  </code></pre>
  
  <p>And it cannot be built. At the very last step I get <code>/bin/sh: 1: conda: not found</code>....<br>
  The first appearance of <code>conda --version</code> did not raise an error which makes me wonder is that an <code>PATH</code> problem?<br>
  I would like to have another <code>RUN</code> entry in this Dockerfile in which I would install packages with <code>conda install ...</code><br>
  At the end I want to have <code>CMD ["bash", "test.py"]</code> entry so that when in do <code>docker run</code> this image it automatically runs a simple python script that imports all the libraries installed with conda. Maybe also a <code>CMD ["bash", "test.sh"]</code> script that would test if conda and python interpreter are indeed installed.  </p>
  
  <p>This is a simplified example, there will be a lot of software so I do not want to change the base image.</p>