Skip to content

Commit

Permalink
make docker image build tag configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
DivineThreepwood committed Feb 13, 2024
1 parent 3cbc144 commit 7d65dcd
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

0 comments on commit 7d65dcd

Please sign in to comment.