From f73f5ea3e3fc24ebee76a7a1198321d7e71575d0 Mon Sep 17 00:00:00 2001 From: Inez Korczynski Date: Wed, 11 Mar 2026 16:43:27 -0700 Subject: [PATCH] Support extra_args in Justfile to provide extra tags or dst to docker Co-authored-by: Stuart Douglas Co-authored-by: Claude Code Ai-assisted: true --- docker/Justfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docker/Justfile b/docker/Justfile index a5100b0..07ec4d7 100644 --- a/docker/Justfile +++ b/docker/Justfile @@ -12,6 +12,7 @@ VERSION := `git describe --tags --always --dirty 2>/dev/null || echo "dev"` GIT_COMMIT := `git rev-parse HEAD 2>/dev/null || echo "unknown"` DOCKERFILE := ROOT + "/docker/Dockerfile" RELEASE := ROOT + "/dist" +DEFAULT_TAGS := "-t cachew:" + TAG # Build Docker image for local development build: @@ -26,7 +27,7 @@ build: @echo "✓ Built cachew:local" # Build multi-arch Docker image (builds for amd64 + arm64, stays in cache) -build-multi: +build-multi *extra_args=(DEFAULT_TAGS): @echo "Building Linux binaries for amd64 and arm64..." @just -f {{ ROOT }}/Justfile build linux amd64 @just -f {{ ROOT }}/Justfile build linux arm64 @@ -37,9 +38,9 @@ build-multi: -f {{ DOCKERFILE }} \ --build-arg VERSION={{ VERSION }} \ --build-arg GIT_COMMIT={{ GIT_COMMIT }} \ - -t cachew:{{ TAG }} \ + {{ extra_args }} \ {{ ROOT }} - @echo "✓ Built multi-arch image (in cache)" + @echo "✓ Built multi-arch image" # Run in Docker (usage: just docker run [log_level]) run log_level="info": build