From 4f0579a8e8a1a72c949c2e7a0878e5d67f43fe40 Mon Sep 17 00:00:00 2001 From: Andrew Wilkins Date: Wed, 17 Feb 2021 15:15:53 +0800 Subject: [PATCH] docker/go/nethttp: go build -mod=mod 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. --- 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/*