From 16d7feb3717b5dc005aef73b3db4843809d6c5fd Mon Sep 17 00:00:00 2001
From: Hugo Kerstens <hugokk@hotmail.nl>
Date: Wed, 29 May 2019 13:35:13 +0200
Subject: [PATCH] Create Dockerfile based on conda

---
 Dockerfile | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index d8b2a61a1..83028cb08 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,15 +1,16 @@
-FROM archlinux/base
-
-## Install packages and clear the cache after installation. Yarn is fixed at 1.6.0 untill 1.8.0 is released due to a critical bug.
-RUN pacman -Sy --noconfirm nodejs python-pip git libdmtx libsm libxrender libxext gcc libmagick6 imagemagick ghostscript; \
-    pacman -U --noconfirm https://archive.archlinux.org/packages/y/yarn/yarn-1.6.0-1-any.pkg.tar.xz
-
-WORKDIR ~
-ADD requirements*.txt ./
-#ADD package.json .
-RUN pip install --no-cache-dir -r requirements.txt -r requirements-dev.txt;
-#RUN yarn install; \
-#    yarn cache clean; \
-#    rm package.json
+FROM continuumio/miniconda3
+
+RUN apt-get update -y && apt-get install -y libdmtx0a 
+
+WORKDIR /app
+
+ADD environment.yml /app/environment.yml
+RUN conda env create
+
+# From https://medium.com/@chadlagore/conda-environments-with-docker-82cdc9d25754
+RUN echo "source activate $(head -1 /app/environment.yml | cut -d' ' -f2)" > ~/.bashrc
+ENV PATH /opt/conda/envs/$(head -1 /app/environment.yml | cut -d' ' -f2)/bin:$PATH
+
+RUN rm -rf /app/environment.yml
 
 CMD bash
\ No newline at end of file
-- 
GitLab