diff --git a/bin/docker-test.sh b/bin/docker-test.sh index a40224e..b1702a8 100755 --- a/bin/docker-test.sh +++ b/bin/docker-test.sh @@ -53,6 +53,7 @@ function get_tag_name() { # Get the tag name TAG_NAME=$(get_tag_name) +DATA_DIR=${DATA_DIR:-$(pwd)/data} echo "Building docker image with tag name: $TAG_NAME" @@ -71,11 +72,11 @@ if [ -z "$1" ] then # This will build the image and run the container with the default make target # (i.e., print help message) - docker run -it --volume $(pwd)/data:/root/data --rm flatnav:$TAG_NAME make help + docker run -it --volume ${DATA_DIR}:/root/data --rm flatnav:$TAG_NAME make help exit 0 fi # Run the container and mount the data/ directory as volume to /root/data # Pass the make target as argument to the container. -docker run -it --volume $(pwd)/data:/root/data --rm flatnav:$TAG_NAME make $1 \ No newline at end of file +docker run -it --volume ${DATA_DIR}:/root/data --rm flatnav:$TAG_NAME make $1 \ No newline at end of file