From 22a42bfef07d6b7df7c06a124821222cbf3ef286 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Thu, 19 Feb 2026 13:32:04 +1100 Subject: [PATCH] try again --- .drone.yml | 18 ++++++++++++++++++ Dockerfile | 7 ++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index f246ee7..3412aba 100644 --- a/.drone.yml +++ b/.drone.yml @@ -48,6 +48,9 @@ steps: repo: "registry.coadcorp.com/nathan/invertergui" dockerfile: Dockerfile platform: "linux/amd64" + build_args: + - TARGETOS=linux + - TARGETARCH=amd64 username: nathan password: from_secret: registry_password @@ -64,6 +67,9 @@ steps: repo: "registry.coadcorp.com/nathan/invertergui" dockerfile: Dockerfile platform: "linux/arm64" + build_args: + - TARGETOS=linux + - TARGETARCH=arm64 username: nathan password: from_secret: registry_password @@ -96,6 +102,9 @@ steps: repo: "registry.coadcorp.com/nathan/invertergui" dockerfile: Dockerfile platform: "linux/amd64" + build_args: + - TARGETOS=linux + - TARGETARCH=amd64 username: nathan password: from_secret: registry_password @@ -115,6 +124,9 @@ steps: repo: "registry.coadcorp.com/nathan/invertergui" dockerfile: Dockerfile platform: "linux/arm64" + build_args: + - TARGETOS=linux + - TARGETARCH=arm64 username: nathan password: from_secret: registry_password @@ -153,6 +165,9 @@ steps: repo: "registry.coadcorp.com/nathan/invertergui" dockerfile: Dockerfile platform: "linux/amd64" + build_args: + - TARGETOS=linux + - TARGETARCH=amd64 username: nathan password: from_secret: registry_password @@ -169,6 +184,9 @@ steps: repo: "registry.coadcorp.com/nathan/invertergui" dockerfile: Dockerfile platform: "linux/arm64" + build_args: + - TARGETOS=linux + - TARGETARCH=arm64 username: nathan password: from_secret: registry_password diff --git a/Dockerfile b/Dockerfile index 78b9e0b..d922386 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,15 @@ -FROM --platform=$BUILDPLATFORM golang:1.26-alpine as builder +FROM golang:1.26-alpine as builder ARG TARGETOS=linux -ARG TARGETARCH +ARG TARGETARCH=amd64 ARG TARGETVARIANT RUN mkdir /build COPY . /build/ WORKDIR /build RUN set -eux; \ - GOARM="${TARGETVARIANT#v}"; \ + GOARM=""; \ + if [ "${TARGETARCH}" = "arm" ] && [ -n "${TARGETVARIANT:-}" ]; then GOARM="${TARGETVARIANT#v}"; fi; \ CGO_ENABLED=0 GOOS="${TARGETOS}" GOARCH="${TARGETARCH}" GOARM="${GOARM}" go build -o invertergui ./cmd/invertergui FROM scratch