Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Commit

Permalink
docker/opbeans/go: use -mod=mod (#1077)
Browse files Browse the repository at this point in the history
  • Loading branch information
axw authored Mar 8, 2021
1 parent 75d4892 commit eba3304
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docker/opbeans/go/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eba3304

Please sign in to comment.