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

docker/opbeans/go: use -mod=mod #1077

Merged
merged 1 commit into from
Mar 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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