diff --git a/docker/hooks/build b/docker/hooks/build new file mode 100644 index 0000000..371640d --- /dev/null +++ b/docker/hooks/build @@ -0,0 +1,7 @@ +#!/bin/bash + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +cd "$DIR/../.." ## make sure we're in the right place. Docker Hub screws this up sometimes +echo "docker build dir: $(pwd)" + +docker build --build-arg DOCKER_TAG=$DOCKER_TAG --build-arg DOCKER_COMMIT=$SOURCE_COMMIT -f $DOCKERFILE_PATH -t $IMAGE_NAME . diff --git a/docker/deploy_scribe_dev.sh b/scripts/deploy_scribe_dev.sh similarity index 78% rename from docker/deploy_scribe_dev.sh rename to scripts/deploy_scribe_dev.sh index 3940128..ed5a94a 100755 --- a/docker/deploy_scribe_dev.sh +++ b/scripts/deploy_scribe_dev.sh @@ -3,11 +3,11 @@ # usage: deploy_scribe_dev.sh TARGET_HOST=$1 -DOCKER_DIR=`dirname $0` -SCRIBE_DIR=`dirname $DOCKER_DIR` +SCRIPTS_DIR=`dirname $0` +SCRIBE_DIR=`dirname $SCRIPTS_DIR` # build the image -docker build -f $DOCKER_DIR/Dockerfile -t lbry/scribe:development $SCRIBE_DIR +docker build -f $SCRIBE_DIR/docker/Dockerfile -t lbry/scribe:development $SCRIBE_DIR IMAGE=`docker image inspect lbry/scribe:development | sed -n "s/^.*Id\":\s*\"sha256:\s*\(\S*\)\".*$/\1/p"` # push the image to the server