diff --git a/Dockerfile.cross b/Dockerfile.cross index ac5821ab90b2..a1918c37adde 100644 --- a/Dockerfile.cross +++ b/Dockerfile.cross @@ -5,8 +5,9 @@ FROM ubuntu:22.04 # Filled by docker buildx ARG TARGETARCH +ARG TAG_NAME -ENV TAG_NAME=something +ENV TAG_NAME=${TAG_NAME} COPY ./dist/bin/$TARGETARCH/* /usr/local/bin/ diff --git a/Makefile b/Makefile index 79544ce85423..9a6d088898f2 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,8 @@ # Cargo profile for builds. PROFILE ?= dev +TAG_NAME ?= dev + # The docker image name DOCKER_IMAGE_NAME ?= ghcr.io/foundry-rs/foundry:latest BIN_DIR = dist/bin @@ -56,7 +58,7 @@ docker-build-push: docker-build-prepare ## Build and push a cross-arch Docker im cp $(CARGO_TARGET_DIR)/aarch64-unknown-linux-gnu/$(PROFILE)/$$bin $(BIN_DIR)/arm64/; \ done - docker buildx build --file ./Dockerfile.cross . \ + docker buildx build --file ./Dockerfile.cross --build-arg TAG_NAME=$(TAG_NAME) . \ --platform linux/amd64,linux/arm64 \ $(foreach tag,$(shell echo $(DOCKER_IMAGE_NAME) | tr ',' ' '),--tag $(tag)) \ --provenance=false \