From 7d65dcd0317c9600f3a9b12c8fa60a06b8b54069 Mon Sep 17 00:00:00 2001 From: Divine Threepwood Date: Tue, 13 Feb 2024 19:28:04 +0100 Subject: [PATCH] make docker image build tag configurable --- build-docker.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/build-docker.sh b/build-docker.sh index 32828cd711..076f1c9a58 100755 --- a/build-docker.sh +++ b/build-docker.sh @@ -10,10 +10,13 @@ WHITE='\033[0;37m' APP_NAME='docker images' APP_NAME=${BLUE}${APP_NAME}${NC} -echo -e "=== ${APP_NAME} build docker image...${WHITE}${NC}" && -docker build -f docker/Dockerfile -t openbaseorg/bco:local . -docker build -f docker/device-manager/openhab/Dockerfile -t openbaseorg/bco-device-manager-openhab:local --build-arg BCO_BASE_IMAGE_VERSION=local docker/device-manager/openhab -docker build -f docker/bco-demo/Dockerfile -t openbaseorg/bco-demo:local --build-arg BCO_BASE_IMAGE_VERSION=local docker/bco-demo +IMAGE_TAG=${1:-local} + +echo -e "=== ${APP_NAME} build docker image...${WHITE}${NC}" + +docker build -f docker/Dockerfile -t openbaseorg/bco:${IMAGE_TAG} . +docker build -f docker/device-manager/openhab/Dockerfile -t openbaseorg/bco-device-manager-openhab:${IMAGE_TAG} --build-arg BCO_BASE_IMAGE_VERSION=${IMAGE_TAG} docker/device-manager/openhab +docker build -f docker/bco-demo/Dockerfile -t openbaseorg/bco-demo:${IMAGE_TAG} --build-arg BCO_BASE_IMAGE_VERSION=${IMAGE_TAG} docker/bco-demo # use this for debugging purpose: DOCKER_BUILDKIT=0 docker build -f docker/Dockerfile --progress=plain . echo -e "=== ${APP_NAME} were ${GREEN}successfully${NC} build.${NC}"