Skip to content

Instantly share code, notes, and snippets.

@ryansch
Last active March 21, 2017 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryansch/c0635ca74d8978a9cf8b0252e6b5d42e to your computer and use it in GitHub Desktop.
Save ryansch/c0635ca74d8978a9cf8b0252e6b5d42e to your computer and use it in GitHub Desktop.
Build terraform for macOS with docker

Run the following from the location of the terraform git clone:

docker run --rm -v $(pwd):/go/src/github.com/hashicorp/terraform -w /go/src/github.com/hashicorp/terraform -e XC_OS=darwin -e XC_ARCH=amd64 golang:latest bash -c "apt-get update && apt-get install -y zip && make bin"

Resulting binary is in pkg/darwin_amd64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment