title: Activate conda environment in docker
body: <p>I need to activate environment in docker and run a command in this environment.
  I create the environment, but then I try to activate this environment and run the command in this way:</p>
  
  <pre><code>CMD [ "source activate mro_env &amp;&amp; ipython kernel install --user --name=mro_env" ]
  </code></pre>
  
  <p>but when I ran docker I get an error:</p>
  
  <pre><code>[FATAL tini (8)] exec source activate mro_env &amp;&amp; ipython kernel install 
  --user --name=mro_env failed: No such file or directory
  </code></pre>
  
  <p>This is the whole Dockerfile:</p>
  
  <pre><code>FROM continuumio/miniconda3
  
  ADD /src/mro_env.yml /src/mro_env.yml
  RUN conda env create -f /src/mro_env.yml
  
  # Pull the environment name out of the mro_env.yml
  RUN echo "source activate $(head -1 /src/mro_env.yml | cut -d' ' -f2)" &gt; ~/.bashrc
  ENV PATH /opt/conda/envs/$(head -1 /src/mro_env.yml | cut -d' ' -f2)/bin:$PATH
  
  CMD [ "source activate mro_env &amp;&amp; ipython kernel install --user --name=mro_env" ]
  </code></pre>