From 721e5ac595edb71d031e91da3acd22d9a5d64c4b Mon Sep 17 00:00:00 2001 From: Will Mooreston Date: Fri, 10 Jan 2025 06:56:57 -0800 Subject: [PATCH] add BUILD_ARCHITECTURE build arg, default linux/amd64 --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 281f807..2871718 100644 --- a/Makefile +++ b/Makefile @@ -25,9 +25,12 @@ LABKEY_VERSION ?= 21.5-SNAPSHOT LABKEY_DISTRIBUTION ?= community LABKEY_EK ?= 123abc456 +BUILD_ARCHITECTURE ?= linux/amd64 + # repo/image:tags must be lowercase BUILD_VERSION ?= $(shell echo '$(LABKEY_VERSION)' | tr A-Z a-z) BUILD_DISTRIBUTION := $(shell echo '$(LABKEY_DISTRIBUTION)' | tr A-Z a-z) +BUILD_ARCHITECTURE ?= $(BUILD_ARCHITECTURE) BUILD_REPO_URI ?= $(AWS_ACCOUNT_ID).dkr.ecr.$(AWS_REGION).amazonaws.com BUILD_REPO_NAME := labkey/$(BUILD_DISTRIBUTION) @@ -57,6 +60,7 @@ build: docker build \ --rm \ --compress \ + --platform $(BUILD_ARCHITECTURE) \ $(CACHE_FLAG) \ -t $(BUILD_REPO_NAME):latest \ -t $(BUILD_LOCAL_TAG) \