Skip to content

Instantly share code, notes, and snippets.

@emmanuel
Created July 16, 2014 23:18
Show Gist options
  • Save emmanuel/f21ddcfb22e3324c8803 to your computer and use it in GitHub Desktop.
Save emmanuel/f21ddcfb22e3324c8803 to your computer and use it in GitHub Desktop.
Cross-compile confd (or any go project) for linux-amd64 on OSX
brew install go --cross-compile-common
export GOPATH=$HOME/Code/go
mkdir -p $GOPATH
cd $GOPATH
hub clone kelseyhightower/confd
cd confd
hub remote add johnrengelman/confd
git fetch johnrengelman
git co consul-services
go get -v -d ./...
GOARCH=amd64 GOOS=linux go -b build -o $GOPATH/confd-json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment