Skip to content

Commit

Permalink
edit docker builder
Browse files Browse the repository at this point in the history
  • Loading branch information
blaise-muhirwa committed Feb 3, 2024
1 parent d859f55 commit aa46e4b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/docker-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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
docker run -it --volume ${DATA_DIR}:/root/data --rm flatnav:$TAG_NAME make $1

0 comments on commit aa46e4b

Please sign in to comment.