Skip to content

Commit

Permalink
Fix: Backslashes need to be double-escaped in Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
bokysan committed Oct 27, 2023
1 parent c60c65c commit a23f0a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions postfix-exporter-01.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/Dockerfile b/Dockerfile
index a3327d8..1e93cb8 100644
index a3327d8..471d70a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,10 @@
Expand Down Expand Up @@ -29,7 +29,7 @@ index a3327d8..1e93cb8 100644
+# 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.
+# Hence disabling the test here.
+# RUN go test
+RUN env GOOS="${TARGETOS}" GOARCH="${TARGETARCH}" GOARM="$( echo "$TARGETVARIANT" grep -E -o "\d+$")" go build -ldflags '-extldflags "-static"' -o /bin/postfix_exporter
+RUN env GOOS="${TARGETOS}" GOARCH="${TARGETARCH}" GOARM="$( echo "$TARGETVARIANT" grep -E -o "\\d+$")" go build -ldflags '-extldflags "-static"' -o /bin/postfix_exporter

-FROM debian:latest
+FROM scratch
Expand Down

0 comments on commit a23f0a3

Please sign in to comment.