Skip to content
This repository has been archived by the owner. It is now read-only.
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Go Builder (Cross Compiler)

The builder uses gox package to cross-compile for target os/architecture combinations.


Clone the Go package into src/<package_name>.

E.g. for package

git clone src/

Run the builder

  • Mount /data to the current directory on host
  • Pass package name as PACKAGE environment variable
docker run --rm -v `pwd`:/data -e

By default, the builder uses bin/{{.Dir}}-{{.OS}}-{{.Arch}} naming template and cross-compiles for the following os/arch combinations:

  • linux/amd64
  • linux/arm
  • windows/amd64
  • darwin/amd64

These can be overriden by setting OSARCH and OUTPUT environment variable. E.g.:

docker run --rm -v `pwd`:/data -e -e OSARCH="linux/arm linux/amd64"

Additionally, ldflags can be passed to the compiler by setting LDFLAGS environment variable.

You can’t perform that action at this time.