From cf9aa2f3c40bb7d34ee5abeee5f039392db137ca Mon Sep 17 00:00:00 2001
From: Jan David Mol <mol@astron.nl>
Date: Wed, 9 Jun 2021 11:10:53 +0200
Subject: [PATCH] SW-966: Let bash do the substitution as /bin/sh fails to do
 so.

---
 Docker/lofar-pulp/Dockerfile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Docker/lofar-pulp/Dockerfile b/Docker/lofar-pulp/Dockerfile
index d309e60121e..fb2247ea5e0 100644
--- a/Docker/lofar-pulp/Dockerfile
+++ b/Docker/lofar-pulp/Dockerfile
@@ -48,13 +48,14 @@ RUN aptitude install -y python3-kombu
 # *******************
 #
 
-ENV LOFAR_BUILDVARIANT=gnucxx11_optarch
+ARG LOFAR_BUILDVARIANT=gnucxx11_optarch
+ENV LOFAR_BUILDVARIANT=${LOFAR_BUILDVARIANT}
 
 # Install
 #some are already installed, but we need boost, and RUN apt-get update && apt-get install -y subversion cmake g++ gfortran bison flex liblog4cplus-dev libhdf5-dev libblitz0-dev python-dev libxml2-dev pkg-config libunittest++-dev libxml++2.6-dev binutils-dev && \
 RUN apt-get update && apt-get install -y liblog4cplus-dev libhdf5-dev libblitz0-dev libunittest++-dev libxml++2.6-dev binutils-dev && \
     mkdir -p /opt/lofar/build/${LOFAR_BUILDVARIANT} /opt/lofar/src && \
-    git clone --depth=1 --branch ${BASE_VERSION//latest/master} https://git.astron.nl/ro/lofar.git /opt/lofar/src && \
+    bash -c 'git clone --depth=1 --branch ${BASE_VERSION//latest/master} https://git.astron.nl/ro/lofar.git /opt/lofar/src' && \
     cd /opt/lofar/src && \
     cd /opt/lofar/build/${LOFAR_BUILDVARIANT} && cmake -DBUILD_PACKAGES="Pipeline MessageBus OTDB_Services" -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=/opt/lofar/ -DCASACORE_ROOT_DIR=/opt/casacore/ -DQPID_ROOT_DIR=/opt/qpid/ -DUSE_OPENMP=True /opt/lofar/src/ && \
     cd /opt/lofar/build/${LOFAR_BUILDVARIANT} && make -j ${J} && \
-- 
GitLab