summaryrefslogtreecommitdiffstats
path: root/docker/build-vespa-image.sh
diff options
context:
space:
mode:
authorGeir Storli <geirst@yahoo-inc.com>2017-06-20 14:17:56 +0200
committerGeir Storli <geirst@yahoo-inc.com>2017-06-20 14:17:56 +0200
commitfb811b95237823ed4be3413231dda817999e6ccb (patch)
treeefb6285dabdedebd3b23b9e5f976cdefc5937ef7 /docker/build-vespa-image.sh
parent86e346744713ce715b94ae70a0233f46c4ab61c4 (diff)
Move building of docker image to separate script and tag it with version number.
Diffstat (limited to 'docker/build-vespa-image.sh')
-rwxr-xr-xdocker/build-vespa-image.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/docker/build-vespa-image.sh b/docker/build-vespa-image.sh
new file mode 100755
index 00000000000..d039e7dcabc
--- /dev/null
+++ b/docker/build-vespa-image.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+set -e
+
+if [ $# -ne 1 ]; then
+ echo "Usage: $0 <vespa version>"
+ exit 1
+fi
+
+DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
+cd $DIR
+
+VESPA_VERSION=$1
+DOCKER_IMAGE=vesparun
+
+docker build -t "$DOCKER_IMAGE":"$VESPA_VERSION" --build-arg VESPA_VERSION="$VESPA_VERSION" -f Dockerfile.run .