diff options
author | johannst <johannes.stoelp@gmail.com> | 2020-09-29 20:18:12 +0200 |
---|---|---|
committer | johannst <johannes.stoelp@gmail.com> | 2020-09-29 20:18:12 +0200 |
commit | 7e2ed3a341ba5f522bc0498c1fcadd846273d079 (patch) | |
tree | e5ab4a526b8accb410d3448d4c5d0e8b93d06b02 | |
parent | d51c60b76da2d4caf8ed780264cfd9b9c1d04471 (diff) | |
download | matcha-threads-7e2ed3a341ba5f522bc0498c1fcadd846273d079.tar.gz matcha-threads-7e2ed3a341ba5f522bc0498c1fcadd846273d079.zip |
allow to pass docker image name to build.sh
-rw-r--r-- | Makefile | 5 | ||||
-rwxr-xr-x | docker/build.sh | 4 |
2 files changed, 6 insertions, 3 deletions
@@ -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 |