Просмотр исходного кода

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 лет назад
Родитель
Сommit
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