diff --git a/tools/build-docker-image b/tools/build-docker-image index 469c63207b..370463dd27 100755 --- a/tools/build-docker-image +++ b/tools/build-docker-image @@ -1,6 +1,7 @@ #!/bin/bash TOPDIR=$(git rev-parse --show-toplevel) +IMGDIR="$(cd "$(dirname "$0")" && pwd)" RELEASE_NAMESPACE=kollaglue NAMESPACE=kollaglue @@ -21,7 +22,7 @@ Options: EOF } -[ -f ./.buildconf ] && . ./.buildconf +[ -f $IMGDIR/.buildconf ] && . $IMGDIR/.buildconf [ -f $TOPDIR/.buildconf ] && . $TOPDIR/.buildconf ARGS=$(getopt -o 'n:t:pN' -l help,namespace:,push,release,tag:,no-cache -- "$@") || { usage >&2; exit 2; } @@ -72,7 +73,7 @@ if [ "$NAMESPACE" = "$RELEASE_NAMESPACE" ] \ exit 1 fi -IMAGE="${PREFIX}${PWD##*/}" +IMAGE="${PREFIX}${IMGDIR##*/}" FULLIMAGE="${NAMESPACE}/${IMAGE}${TAG:+:${TAG}}" cat <