Skip to content

Commit

Permalink
Fix: Refactor build to use native (platform) images and try rebuilding.
Browse files Browse the repository at this point in the history
Consequentially, `linux/arm/v6` and `linux/riscv6` are not built, as
there are no go images for these.
  • Loading branch information
bokysan committed Oct 27, 2023
1 parent 0fcfdce commit 33dec82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/actions/build-postfix-exporter/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ runs:
context: postfix_exporter
push: true
tags: '${{ inputs.tags }}'
platforms: "linux/386,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/riscv64"
platforms: "linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/mips64le,linux/ppc64le,linux/s390x"
# ,linux/arm/v6,,,,linux/arm64,,,,linux/riscv64"
cache-from: type=local,src=/tmp/.buildx-cache/postfix-exporter,mode=max,compression=estargz
cache-to: type=local,dest=/tmp/.buildx-cache-new/postfix-exporter

Expand Down
4 changes: 2 additions & 2 deletions postfix-exporter-01.patch
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
diff --git a/Dockerfile b/Dockerfile
index a3327d8..2b13fbb 100644
index a3327d8..1cdfa84 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,10 @@
-FROM golang:1.16 AS builder
+# syntax=docker/dockerfile:1.2
+FROM --platform=$BUILDPLATFORM golang:1.21 AS builder
+FROM golang:1.21.3-bookworm AS builder
+ARG TARGETPLATFORM
+ARG TARGETOS
+ARG TARGETARCH
Expand Down

0 comments on commit 33dec82

Please sign in to comment.