浏览代码

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 ./test/*.go;\
     go test ./pkg/*;\
     go test ./pkg/*;\
     cd cmd/costmodel;\
     cd cmd/costmodel;\
-    GOOS=linux GOARCH=amd64 \
+    GOOS=linux \
     go build -a -installsuffix cgo -o /go/bin/app
     go build -a -installsuffix cgo -o /go/bin/app
 
 
 FROM alpine:latest
 FROM alpine:latest