summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-01-23 15:14:34 +0100
committerFlorian Dold <florian@dold.me>2023-01-23 15:14:34 +0100
commitafa28402be90b4567b6905c5ff2b296522831a8a (patch)
tree07a4e9d07c21143deaced04533337b907296dd44
parentd06949f103e02ffe511323e516e7d244de03f983 (diff)
downloaddeployment-afa28402be90b4567b6905c5ff2b296522831a8a.tar.gz
deployment-afa28402be90b4567b6905c5ff2b296522831a8a.tar.bz2
deployment-afa28402be90b4567b6905c5ff2b296522831a8a.zip
simplify buildconfig
-rwxr-xr-xsandcastle/build_base.sh13
-rw-r--r--sandcastle/images/base/Dockerfile13
2 files changed, 5 insertions, 21 deletions
diff --git a/sandcastle/build_base.sh b/sandcastle/build_base.sh
index 3cb8c41..655d204 100755
--- 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
index f2b6b4e..7646b41 100644
--- 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}