From fabb36bea8fd0efcf318f9b0c758e61014129098 Mon Sep 17 00:00:00 2001 From: Arkav Date: Sat, 22 Nov 2025 17:54:26 -0600 Subject: [PATCH] fix arm64 images being incorrecly annotated as amd64 --- .github/workflows/build-container-ghcr.yml | 4 ++-- Dockerfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-container-ghcr.yml b/.github/workflows/build-container-ghcr.yml index ab463f6..d124b65 100644 --- a/.github/workflows/build-container-ghcr.yml +++ b/.github/workflows/build-container-ghcr.yml @@ -22,10 +22,10 @@ jobs: # Build per-arch images - name: Build amd64 image run: | - docker build -t ${IMAGE_NAME}:${VERSION}-amd64 -f Dockerfile --build-arg ARCH=amd64 . + docker build --platform linux/amd64 -t ${IMAGE_NAME}:${VERSION}-amd64 -f Dockerfile --build-arg ARCH=amd64 . - name: Build arm64 image run: | - docker build -t ${IMAGE_NAME}:${VERSION}-arm64 -f Dockerfile --build-arg ARCH=arm64 . + docker build --platform linux/arm64 -t ${IMAGE_NAME}:${VERSION}-arm64 -f Dockerfile --build-arg ARCH=arm64 . - name: Push per-arch images run: | docker push ${IMAGE_NAME}:${VERSION}-amd64 diff --git a/Dockerfile b/Dockerfile index 4758f0f..869502c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.24-alpine AS build +FROM --platform=$BUILDPLATFORM golang:1.24-alpine AS build ARG ARCH=amd64 WORKDIR /build COPY main.go .