Skip to content

Commit

Permalink
port 9335e77: Add '-mod readonly' to build Dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
sharnoff committed Jan 11, 2023
1 parent f1003ae commit 2efd00c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build/vm-informant/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ ARG GIT_INFO

RUN --mount=type=cache,target=/root/.cache/go-build \
go build -a \
# future compat: don't modify go.mod if we have a vendor directory \
-mod readonly \
# -ldflags "-X ..." allows us to overwrite the value of a variable in a package \
-ldflags "-X 'github.com/neondatabase/autoscaling/pkg/util.BuildGitInfo=$GIT_INFO'" \
cmd/vm-informant/main.go
Expand Down

0 comments on commit 2efd00c

Please sign in to comment.