aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rwxr-xr-xdocker/build.sh4
2 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 80f59d0..b725812 100644
--- a/Makefile
+++ b/Makefile
@@ -43,8 +43,9 @@ else
endif
docker: docker/Dockerfile
- cd docker && ./build.sh
- docker run -it --rm -v $(PWD):/develop matcha-box:latest
+ $(eval IMG := matcha-box)
+ cd docker && ./build.sh $(IMG)
+ docker run -it --rm -v $(PWD):/develop $(IMG):latest
.PHONY: docker
diff --git a/docker/build.sh b/docker/build.sh
index bfbdd4b..3b374e6 100755
--- a/docker/build.sh
+++ b/docker/build.sh
@@ -1,7 +1,9 @@
#!/bin/bash
# Copyright (c) 2020 Johannes Stoelp
-if ! docker build -t matcha-box . ; then
+image=${1:-match-box}
+
+if ! docker build -t $image . ; then
echo "ERR: Failed to build docker image!"
exit 1
fi