From 4dda8e2a8780502c2c4e25ae70b2266fdaf91585 Mon Sep 17 00:00:00 2001 From: David Boreham Date: Sat, 28 Jan 2023 18:56:43 +0100 Subject: [PATCH] Install gerbil packages globally not locally in the project directory Former-commit-id: 5928e40721a43a7e8ee2fc90f43db94c6a8e3d78 --- app/data/container-build/cerc-builder-gerbil/Dockerfile | 6 ++++++ .../cerc-builder-gerbil/install-dependencies.sh | 1 + 2 files changed, 7 insertions(+) diff --git a/app/data/container-build/cerc-builder-gerbil/Dockerfile b/app/data/container-build/cerc-builder-gerbil/Dockerfile index f849d8ea..a18dfa72 100644 --- a/app/data/container-build/cerc-builder-gerbil/Dockerfile +++ b/app/data/container-build/cerc-builder-gerbil/Dockerfile @@ -16,6 +16,12 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive && export DEBCONF_NO RUN mkdir /scripts COPY install-dependencies.sh /scripts +# Override the definition of GERBIL_PATH in the base image, but +# is safe because (at present) no gerbil packages are installed in the base image +# We do this in order to allow a set of pre-installed packages from the container +# to be used with an arbitrary, potentially different set of projects bind mounted +# at /src +ENV GERBIL_PATH=/.gerbil RUN bash /scripts/install-dependencies.sh # Needed to prevent git from raging about /src diff --git a/app/data/container-build/cerc-builder-gerbil/install-dependencies.sh b/app/data/container-build/cerc-builder-gerbil/install-dependencies.sh index c6725ef8..dbbbfe84 100755 --- a/app/data/container-build/cerc-builder-gerbil/install-dependencies.sh +++ b/app/data/container-build/cerc-builder-gerbil/install-dependencies.sh @@ -10,6 +10,7 @@ DEPS=(github.com/fare/gerbil-utils github.com/vyzo/gerbil-libp2p ) ; for i in ${DEPS[@]} ; do + echo "Installing gerbil package: $i" gxpkg install $i && gxpkg build $i done