Skip to content

Commit

Permalink
feat:add default build param GOOS GOARCH (#2155)
Browse files Browse the repository at this point in the history
Co-authored-by: wenmanxiang <[email protected]>
  • Loading branch information
garenwen and wenmanxiang authored Mar 16, 2023
1 parent d1388ff commit f53cc8d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hack/docker-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ GOPROXY=${GOPROXY:-`go env GOPROXY`}
GOTAGS=${GOTAGS:-}
GOGCFLAGS=${GOGCFLAGS:-}

GOOS=${GOOS:-linux}
GOARCH=${GOARCH:-amd64}

# enable bash debug output
DEBUG=${DEBUG:-}

Expand All @@ -27,6 +30,7 @@ fi
docker-build() {
name=$1
docker build \
--platform ${GOOS}/${GOARCH} \
--build-arg CGO_ENABLED="${CGO_ENABLED}" \
--build-arg GOPROXY="${GOPROXY}" \
--build-arg GOTAGS="${GOTAGS}" \
Expand Down

0 comments on commit f53cc8d

Please sign in to comment.