From ada89661d520d55437eda6e5c13392eb2d240572 Mon Sep 17 00:00:00 2001 From: Alvin Huang <17609145+alvin-huang@users.noreply.github.com> Date: Wed, 17 Jun 2020 15:21:45 -0400 Subject: [PATCH] don't update deps of gox in docker build and use -mod=readonly --- scripts/build.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/build.sh b/scripts/build.sh index 72af007ee..344e39d69 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -36,12 +36,15 @@ fi if ! which gox > /dev/null; then echo "==> Installing gox..." - go get -u github.com/mitchellh/gox + go get github.com/mitchellh/gox fi # Instruct gox to build statically linked binaries export CGO_ENABLED=0 +# Set module download mode to readonly to not implicitly update go.mod +export GOFLAGS="-mod=readonly" + # In release mode we don't want debug information in the binary if [[ -n "${TF_RELEASE}" ]]; then LD_FLAGS="-s -w"