gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-deployment] branch master updated: No dummy file to conditionally


From: gnunet
Subject: [taler-deployment] branch master updated: No dummy file to conditionally copy from host.
Date: Wed, 16 Nov 2022 23:16:28 +0100

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository deployment.

The following commit(s) were added to refs/heads/master by this push:
     new 8739d71  No dummy file to conditionally copy from host.
8739d71 is described below

commit 8739d715b1afd507b57a6b2f1042ed662f4aa284
Author: MS <ms@taler.net>
AuthorDate: Wed Nov 16 23:15:34 2022 +0100

    No dummy file to conditionally copy from host.
---
 docker/demo/build_base.sh          | 17 ++++++-----------
 docker/demo/images/base/Dockerfile |  8 +++++++-
 2 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/docker/demo/build_base.sh b/docker/demo/build_base.sh
index 57b639d..578ee9d 100755
--- a/docker/demo/build_base.sh
+++ b/docker/demo/build_base.sh
@@ -25,6 +25,11 @@ if ! test -a $DOCKER_FILE; then
   exit 1
 fi
 
+# Allows extra features to conditionally copy files
+# from the host during the build.  That solves the
+# case where the tag file is not given.
+export DOCKER_BUILDKIT=1
+
 if test -n "$2"; then
   ! test -a "$2" && (echo "Tag file: $2 not found." && exit 1) 
   TAGS_FILE_DIR=$(dirname $2)
@@ -38,16 +43,6 @@ if test -n "$2"; then
   exit 0
 fi
 
-# Tags file not given, need a dummy one to
-# make COPY happy.
-echo Creating the dummy 'taler_notags' file.
-touch taler_notags
 docker build --no-cache \
   -t taler_local/taler_base \
-  -f $DOCKER_FILE . || (
-    echo Removing the dummy 'taler_notags' file.
-    rm -f taler_notags
-    exit 1
-  )
-echo Removing the dummy 'taler_notags' file.
-rm -f taler_notags
+  -f $DOCKER_FILE .
diff --git a/docker/demo/images/base/Dockerfile 
b/docker/demo/images/base/Dockerfile
index 840ca66..222f9ba 100644
--- a/docker/demo/images/base/Dockerfile
+++ b/docker/demo/images/base/Dockerfile
@@ -11,7 +11,13 @@ RUN apt-get install -y autoconf autopoint libtool texinfo \
 RUN pip3 install requests click poetry uwsgi htmlark
 
 ARG tags_file
-COPY ${tags_file:-taler_notags} /tags.sh
+# The following command works around COPY not being conditional.
+# Mounts the current directory - where the tags file might be -
+# to /context in the container.  Note: build_base.sh 'cd' to
+# the tags file's directory before building, and sets $tags_file
+# to the tags file's basename.
+RUN --mount=target=/context if test -n "$tags_file"; then cp \
+/context/${tags_file} /tags.sh; else touch /tags.sh; fi
 
 RUN . /tags.sh && git clone git://git.gnunet.org/libmicrohttpd \
   --branch ${TAG_LIBMHD:-master}

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]