File tree 1 file changed +2
-1
lines changed
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ index 75a22d8..81145c9 100644
5
5
@@ -1,8 +1,41 @@
6
6
- FROM scratch
7
7
+ # syntax=docker/dockerfile:1.2
8
- + FROM golang:1.23 AS builder
8
+ + FROM --platform=$BUILDPLATFORM golang:1.23 AS builder
9
9
LABEL org.opencontainers.image.source="https://github.com/hsn723/postfix_exporter" \
10
10
org.opencontainers.image.authors="Hsn723" \
11
11
org.opencontainers.image.title="postfix_exporter"
@@ -38,6 +38,7 @@ index 75a22d8..81145c9 100644
38
38
+ # Since we are checking out a specific SHA hash and we know this tests have worked previously, we are quite certain that the code will work.
39
39
+ # Hence disabling the test here.
40
40
+ # RUN go test
41
+ + RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM $TARGETOS/$TARGETARCH/$TARGETVARIANT"
41
42
+ RUN env GOOS="${TARGETOS}" GOARCH="${TARGETARCH}" GOARM="$( echo "$TARGETVARIANT" | grep -E -o "\\d+$")" go build -ldflags '-extldflags "-static"' -o /bin/postfix_exporter
42
43
+
43
44
+ FROM scratch
You can’t perform that action at this time.
0 commit comments