Skip to content

Commit

Permalink
fix: allow overriding GOARCH for 'go' when running from source
Browse files Browse the repository at this point in the history
  • Loading branch information
boukeversteegh committed Mar 20, 2022
1 parent 0934e53 commit fd34712
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/dockerized
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ esac

case "$(uname -m)" in
x86_64)
GOARCH=amd64
DOCKERIZED_COMPILE_GOARCH=amd64
;;
i*86)
GOARCH=386
DOCKERIZED_COMPILE_GOARCH=386
;;

esac
Expand All @@ -71,6 +71,7 @@ if [ "$DOCKERIZED_COMPILE" ] || [ ! -f "$DOCKERIZED_BINARY" ]; then
--rm \
--entrypoint=go \
-e "GOOS=${DOCKERIZED_COMPILE_GOOS}" \
-e "GOARCH=${DOCKERIZED_COMPILE_GOARCH}" \
-v "${DOCKERIZED_ROOT}:/src" \
-v "${DOCKERIZED_ROOT}/build:/build" \
-v "${DOCKERIZED_ROOT}/.cache:/go/pkg" \
Expand Down

0 comments on commit fd34712

Please sign in to comment.