From 842fbecf76ceb09740a91950fd41a112db063178 Mon Sep 17 00:00:00 2001
From: B13nch3n <b13nch3n_01@theb-si.de>
Date: Tue, 20 Sep 2022 13:42:31 +0200
Subject: [PATCH] Improve DOckerfile

---
 Dockerfile | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 5e325e1..fd18729 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -26,8 +26,6 @@ RUN set -e pipefail; \
     apt-get update -y; \
     apt-get install -y git pip; \
     pip install -r requirements.txt; \
-    # for development, install black & PyLint
-    pip install black pylint; \
     git clone https://github.com/ihmwg/python-ihm.git ihm.git; \
     cd ihm.git; \
     python3 setup.py build; \
@@ -41,6 +39,15 @@ RUN set -e pipefail; \
     rm -rf ${SRC_DIR}/modelcif.git; \
     apt-get remove -y git pip
 
+# switch to development version via build-arg
+ARG ADD_DEV
+RUN set -e pipefail; \
+    if test xYES = x`echo ${ADD_DEV} | tr '[:lower:]' '[:upper:]'`; then \
+      apt-get install -y pip emacs; \
+      pip install black pylint; \
+      apt-get remove -y pip; \
+    fi
+
 ## Copy tool(s)
 COPY --chmod=755 translate2modelcif.py /usr/local/bin/translate2modelcif
 
-- 
GitLab