summaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorMS <ms@taler.net>2022-11-21 15:17:33 +0100
committerMS <ms@taler.net>2022-11-21 15:27:48 +0100
commit050bab12ada63672d11c8f5fdc67ef9abde7b27d (patch)
tree5656d2888acfa359adae5942a365db6044ec685a /docker
parente5aa2e67aed67a0f568cd8a5f7ae73aa23add25a (diff)
downloaddeployment-050bab12ada63672d11c8f5fdc67ef9abde7b27d.tar.gz
deployment-050bab12ada63672d11c8f5fdc67ef9abde7b27d.tar.bz2
deployment-050bab12ada63672d11c8f5fdc67ef9abde7b27d.zip
Define docker-file path from script location.
Diffstat (limited to 'docker')
-rw-r--r--docker/demo/README11
-rwxr-xr-xdocker/demo/build_base.sh27
2 files changed, 14 insertions, 24 deletions
diff --git a/docker/demo/README b/docker/demo/README
index 15f5041..dc329a8 100644
--- a/docker/demo/README
+++ b/docker/demo/README
@@ -25,16 +25,7 @@ with ALL the Taler software and its dependencies.
From this directory, run:
- # Without arguments, it prints the help message.
- $ ./build_base.sh $docker-file [tags-file]
-
-tags-file is a bash source having environment variable
-definitions to specify which tags should be pulled for
-some of the components. The following tags can be given:
-TAG_LIBMHD, TAG_GNUNET, TAG_EXCHANGE, TAG_MERCHANT,
-TAG_WALLET, TAG_LIBEUFIN, TAG_MERCHANT_DEMOS, TAG_SYNC.
-If tags-file is missing, all the code will be pulled
-to master's HEAD.
+ $ ./build_base.sh [--help] [tags-file]
Composed containers
-------------------
diff --git a/docker/demo/build_base.sh b/docker/demo/build_base.sh
index eb074a6..b9ddc61 100755
--- a/docker/demo/build_base.sh
+++ b/docker/demo/build_base.sh
@@ -5,12 +5,16 @@
set -e
usage () {
- echo Usage: ./build_base.sh [-h, --help] docker-file [tags-file]
+ echo Usage: ./build_base.sh [-h, --help] [tags-file]
echo
echo Builds the taler_local/taler_base base image, optionally
echo using the 'tags-file', a text file containing environment
echo variables definitions to specify to which Git tag each Taler
- echo component should be pulled.
+ echo component should be pulled. The following tags exist:
+ echo TAG_LIBMHD, TAG_GNUNET, TAG_EXCHANGE, TAG_MERCHANT,
+ echo TAG_WALLET, TAG_LIBEUFIN, TAG_MERCHANT_DEMOS, TAG_SYNC.
+ echo If tags-file is missing, all the code will be pulled
+ echo from master\'s HEAD.
}
for helpOpt in "-h" "--help"; do
@@ -24,14 +28,7 @@ if ! which realpath > /dev/null; then
echo "Please, install 'realpath' (coreutils)"
fi
-# Help message not returned, assume the first
-# argument is the Dockerfile.
-if test -z "$1"; then
- echo docker-file argument not found.
- exit 1
-fi
-
-DOCKER_FILE=$(realpath $1)
+DOCKER_FILE="$(dirname $(realpath $BASH_SOURCE))/images/base/Dockerfile"
# Check base file.
if ! test -a $DOCKER_FILE; then
@@ -44,10 +41,12 @@ fi
# 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)
- TAGS_FILE_NAME=$(basename $2)
+
+# --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 --force-rm \
-t taler_local/taler_base \