فهرست منبع

Don't specify architecture in Dockerfile go build

Specifying the architecture forces the image to only support amd64 even
if we're trying to build an ARM64 image in an ARM64 environment with
something like docker buildx. Making this change means the built binary
will support the architecture of the environment it was built in.
Michael Dresser 4 سال پیش
والد
کامیت
2c8df6205f
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      Dockerfile

+ 1 - 1
Dockerfile

@@ -20,7 +20,7 @@ RUN set -e ;\
     go test ./test/*.go;\
     go test ./pkg/*;\
     cd cmd/costmodel;\
-    GOOS=linux GOARCH=amd64 \
+    GOOS=linux \
     go build -a -installsuffix cgo -o /go/bin/app
 
 FROM alpine:latest