commit afa28402be90b4567b6905c5ff2b296522831a8a
parent d06949f103e02ffe511323e516e7d244de03f983
Author: Florian Dold <florian@dold.me>
Date: Mon, 23 Jan 2023 15:14:34 +0100
simplify buildconfig
Diffstat:
2 files changed, 5 insertions(+), 21 deletions(-)
diff --git a/sandcastle/build_base.sh b/sandcastle/build_base.sh
@@ -41,19 +41,14 @@ fi
# case where the tag file is not given.
export DOCKER_BUILDKIT=1
+mkdir -p buildconfig
# --help option not found in $1, check for the tags-file.
if test -n "$1"; then
! test -a "$1" && (echo "Tag file: $1 not found." && exit 1)
- TAGS_FILE_DIR=$(dirname $1)
- TAGS_FILE_NAME=$(basename $1)
- cd $TAGS_FILE_DIR
- docker build --no-cache \
- -t taler_local/taler_base \
- -f $DOCKER_FILE \
- --build-arg tags_file=$TAGS_FILE_NAME .
- cd - > /dev/null
- exit 0
+ cp $1 buildconfig/tags.sh
+else
+ echo "" > buildconfig/tags.sh
fi
docker build --no-cache \
diff --git a/sandcastle/images/base/Dockerfile b/sandcastle/images/base/Dockerfile
@@ -10,18 +10,7 @@ RUN apt-get install -y autoconf autopoint libtool texinfo \
python3-sphinx-rtd-theme sqlite3 vim emacs nodejs
RUN pip3 install requests click poetry uwsgi htmlark
-ARG tags_file
-# The following command provides a conditional copy from
-# the host filesystem. It mounts the current directory -
-# where the tags file MIGHT be - to /context in the container.
-# It appears NOT possible to mount arbitrary paths from the
-# host with "RUN --mount". Hence, when a tags file is given,
-# the CWD has to be the one containing the tags file. build_base.sh
-# sets (1) the CWD this way and (2) $tags_file to be the tags file
-# basename, before starting the compilation.
-RUN --mount=target=/context if test -n "$tags_file"; then cp \
-/context/${tags_file} /tags.sh; else touch /tags.sh; fi
-
+COPY buildconfig/tags.sh tags.sh
RUN . /tags.sh && git clone git://git.gnunet.org/libmicrohttpd \
--branch ${TAG_LIBMHD:-master}