From 04e102cb747f6a9154c7736277df59f9a677a975 Mon Sep 17 00:00:00 2001 From: WeebDataHoarder <57538841+WeebDataHoarder@users.noreply.github.com> Date: Tue, 8 Apr 2025 01:29:02 +0200 Subject: [PATCH] Fix arm64 builds --- .drone.jsonnet | 3 +++ .drone.yml | 14 ++++++++++---- Dockerfile | 6 +++--- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index b90de5a..9a3ef06 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -65,6 +65,9 @@ local Publish(go, alpine, os, arch, trigger, platforms, extra) = { name: "docker", image: "plugins/buildx", privileged: true, + environment: { + DOCKER_BUILDKIT: "1" + }, settings: { registry: "git.gammaspectra.live", repo: "git.gammaspectra.live/git/go-away", diff --git a/.drone.yml b/.drone.yml index 1d7b488..2a2a749 100644 --- a/.drone.yml +++ b/.drone.yml @@ -165,7 +165,9 @@ platform: arch: amd64 os: linux steps: -- image: plugins/buildx +- environment: + DOCKER_BUILDKIT: "1" + image: plugins/buildx name: docker privileged: true settings: @@ -199,7 +201,9 @@ platform: arch: amd64 os: linux steps: -- image: plugins/buildx +- environment: + DOCKER_BUILDKIT: "1" + image: plugins/buildx name: docker privileged: true settings: @@ -233,7 +237,9 @@ platform: arch: amd64 os: linux steps: -- image: plugins/buildx +- environment: + DOCKER_BUILDKIT: "1" + image: plugins/buildx name: docker privileged: true settings: @@ -262,6 +268,6 @@ trigger: type: docker --- kind: signature -hmac: 90e6da0206cabda47b8279b4704e95f68f5a36ff04d07284ff9ef203fc96a911 +hmac: 3cbd114d368c7bd348105921d85c703db1c1bc46de79f00daabbca23ffac6050 ... diff --git a/Dockerfile b/Dockerfile index 8aa944c..53e3094 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,13 @@ ARG from_builder=golang:1.24-alpine3.21 ARG from=alpine:3.21 -ARG TARGETPLATFORM -ARG TARGETARCH -ARG TARGETOS ARG BUILDPLATFORM FROM --platform=$BUILDPLATFORM ${from_builder} AS build +ARG TARGETARCH +ARG TARGETOS + RUN apk update && apk add --no-cache \ bash \ git \