Add a way to provide Karaf custom archive location in Docker build.sh
usage() {
cat <<HERE
Usage:
- build.sh --from-local-dist [--image-name <image>]
+ build.sh --from-local-dist [--archive <archive>] [--image-name <image>]
build.sh --from-release --karaf-version <x.x.x> [--image-name <image>]
build.sh --help
@@ -44,6 +44,10 @@ key="$1"
IMAGE_NAME="$2"
shift
;;
+ --archive)
+ ARCHIVE="$2"
+ shift
+ ;;
--karaf-version)
KARAF_VERSION="$2"
shift
@@ -86,7 +90,11 @@ if [ -n "${FROM_RELEASE}" ]; then
elif [ -n "${FROM_LOCAL}" ]; then
+ if [ -n "${ARCHIVE}" ]; then
+ DIST_DIR=${ARCHIVE}
+ else
DIST_DIR=../apache-karaf/target/apache-karaf-*.tar.gz
+ fi
KARAF_DIST=${TMPDIR}/apache-karaf.tar.gz
echo "Using karaf dist: ${DIST_DIR}"
cp ${DIST_DIR} ${KARAF_DIST}
