From 3b3e7b4bca579c26828a42f4a9ddc7ec386e9b3b Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 23 Feb 2021 16:19:24 +0000 Subject: [PATCH] docker/go/nethttp: go build -mod=mod (#1061) (#1067) Go 1.16 changed the "go build" command so that it no longer automatically updates go.mod and go.sum. Because we dynamically change the Go agent version, we cannot set go.mod and go.sum ahead of time. Pass in `-mod=mod` to reinstate the old behaviour. Co-authored-by: Andrew Wilkins --- docker/go/nethttp/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/go/nethttp/Dockerfile b/docker/go/nethttp/Dockerfile index f3aa827a7..4c2ec51e1 100644 --- a/docker/go/nethttp/Dockerfile +++ b/docker/go/nethttp/Dockerfile @@ -8,7 +8,7 @@ RUN git clone https://github.com/${GO_AGENT_REPO}.git /src/apm-agent-go RUN (cd /src/apm-agent-go \ && git fetch -q origin '+refs/pull/*:refs/remotes/origin/pr/*' \ && git checkout ${GO_AGENT_BRANCH}) -RUN CGO_ENABLED=0 go build +RUN CGO_ENABLED=0 go build -mod=mod FROM alpine:latest RUN apk add --update curl && rm -rf /var/cache/apk/*