From eba3304994b88e1cc87d5a81b025f7dad39ec219 Mon Sep 17 00:00:00 2001 From: Andrew Wilkins Date: Mon, 8 Mar 2021 22:23:48 +0800 Subject: [PATCH] docker/opbeans/go: use -mod=mod (#1077) --- docker/opbeans/go/Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker/opbeans/go/Dockerfile b/docker/opbeans/go/Dockerfile index 8507d38fd..9f572bba7 100644 --- a/docker/opbeans/go/Dockerfile +++ b/docker/opbeans/go/Dockerfile @@ -20,6 +20,11 @@ RUN git clone https://github.com/${GO_AGENT_REPO}.git /src/go.elastic.co/apm RUN (cd /src/go.elastic.co/apm \ && git fetch -q origin '+refs/pull/*:refs/remotes/origin/pr/*' \ && git checkout ${GO_AGENT_BRANCH}) + +# Don't complain if there are missing dependencies in go.mod, +# as we may be building against an unreleased branch. +ENV GOFLAGS=-mod=mod + # Add "replace" stanzas to go.mod to use the local agent repo RUN go list -m all | grep apm | cut -d' ' -f1 | xargs -i go mod edit -replace {}=/src/{} RUN go build