From 505b23c3276f7f076d7e1e2c0d1730403a97661e Mon Sep 17 00:00:00 2001 From: Joseph Weston <joseph@weston.cloud> Date: Thu, 3 Oct 2019 11:29:12 +0200 Subject: [PATCH] correct environment loading in Dockerfile --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index eae8ae5..86de4ba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,8 +21,7 @@ RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-4.5.11-Linux-x86 rm ~/miniconda.sh && \ /opt/conda/bin/conda clean -tipsy && \ 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 + echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc ENV TINI_VERSION v0.16.1 ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini @@ -32,7 +31,8 @@ RUN mkdir /environments COPY environment.yml /environments/ RUN conda-env create -f /environments/environment.yml && \ - echo "conda activate revtex-markdown-paper" >> ~/.bashrc + # ensure that we activate the environment in any shell (Gitlab CI uses 'sh') + echo ". activate revtex-markdown-paper" >> /etc/profile ENTRYPOINT [ "/usr/bin/tini", "--" ] CMD [ "/bin/bash" ] -- GitLab