From a6acc888a36694e3306993cfc3108752b60bd1f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tibor=20=C5=A0imko?= Date: Tue, 12 Dec 2023 14:07:55 +0100 Subject: [PATCH] build(docker): non-editable submodules in "latest" mode (#255) When running development cluster in "latest" mode, install shared modules in non-editable mode. The editable mode should be reserved only for development clusters in "debug" mode with the live code reload. --- Dockerfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 90dda01..e94c44f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,8 +46,14 @@ ARG DEBUG=0 RUN if [ "${DEBUG}" -gt 0 ]; then pip install --no-cache-dir -e ".[debug]"; else pip install --no-cache-dir .; fi; # Are we building with locally-checked-out shared modules? -# hadolint ignore=SC2102 -RUN if test -e modules/reana-commons; then pip install --no-cache-dir -e modules/reana-commons[kubernetes] --upgrade; fi +# hadolint ignore=DL3013 +RUN if test -e modules/reana-commons; then \ + if [ "${DEBUG}" -gt 0 ]; then \ + pip install --no-cache-dir -e "modules/reana-commons[kubernetes]" --upgrade; \ + else \ + pip install --no-cache-dir "modules/reana-commons[kubernetes]" --upgrade; \ + fi \ + fi # Check for any broken Python dependencies RUN pip check