From 64d261a3bafbbad0bc057fedabae3154ee2e452e Mon Sep 17 00:00:00 2001
From: Pavlos-Petros Tournaris
Date: Sat, 9 Dec 2023 07:11:40 +0200
Subject: [PATCH] fix: multiplatform compatibility (#17)
* Fix multiplatform compatibility
Even though the builder image was pulling multi-arch images the final binary was being built for amd64 arch only.
* chore: keep base image label
---------
Co-authored-by: Konstantin Chukhlomin
---
Dockerfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile
index 6ca2042..ffbabd4 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -7,7 +7,7 @@ RUN go test -mod=vendor -cover ./...
RUN go build -mod=vendor -o /go/bin/app
-FROM gcr.io/distroless/static:966f4bd97f611354c4ad829f1ed298df9386c2ec
+FROM --platform=$BUILDPLATFORM gcr.io/distroless/static:966f4bd97f611354c4ad829f1ed298df9386c2ec
# latest-amd64 -> 966f4bd97f611354c4ad829f1ed298df9386c2ec
# https://github.com/GoogleContainerTools/distroless/tree/master/base