Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bake-docker.sh -t option can handle single/multiple tags #45

Merged
merged 3 commits into from
Jan 30, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions bake-docker.sh
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ function help {
echo "-l build using local registry"
echo "-P <platform> specify platform"
echo " build linux/arm64 and linux/amd64 if not specified"
echo "-t <tags> additional tags"
echo "-t <tag>[,<tag>] 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=
2 changes: 1 addition & 1 deletion docker-compose-base.yaml
Original file line number Diff line number Diff line change
@@ -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: