diff --git a/bake-docker.sh b/bake-docker.sh index ac9eef26..becfee33 100755 --- a/bake-docker.sh +++ b/bake-docker.sh @@ -36,7 +36,7 @@ function help { echo "-l build using local registry" echo "-P specify platform" echo " build linux/arm64 and linux/amd64 if not specified" - echo "-t additional tags" + echo "-t [,] tag or tags" } platform= @@ -116,9 +116,13 @@ fi # tag option tag_option= if [[ -z $tags ]]; then - tags="latest,$(git rev-parse --abbrev-ref HEAD)" + tags="latest,$(git rev-parse --abbrev-ref HEAD | tr '/' '-')" +fi +if [[ "$tags" == *,* ]]; then + tag_option="--set=${service}.tags=${REGISTRY}/cabot-${service}:{$tags}" +else + tag_option="--set=${service}.tags=${REGISTRY}/cabot-${service}:$tags" fi -tag_option="--set=${service}.tags=${REGISTRY}/cabot-${service}:{${tags}}" # platform option platform_option= diff --git a/docker-compose-base.yaml b/docker-compose-base.yaml index 164f0285..490fc9a3 100644 --- a/docker-compose-base.yaml +++ b/docker-compose-base.yaml @@ -1,6 +1,6 @@ services: driver-base: - image: cmucal/cabot-driver + image: cmucal/cabot-driver:${CABOT_LAUNCH_IMAGE_TAG:-latest} build: context: ./docker/driver additional_contexts: