Răsfoiți Sursa

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 ani în urmă
părinte
comite
2c8df6205f
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  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