Name: golang-builder
Owner: Prometheus
Description: Prometheus Golang builder Docker images
Created: 2016-02-06 20:04:49.0
Updated: 2018-05-23 07:59:57.0
Pushed: 2018-05-05 12:32:42.0
Homepage: null
Size: 88
Language: Shell
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Docker Builder Image for cross-building Golang Prometheus projects.
latest
, main
, 1.10-main
, 1.10.2-main
(1.10/main/Dockerfile)arm
, 1.10-arm
, 1.10.2-arm
(1.10/arm/Dockerfile)powerpc
, 1.10-powerpc
, 1.10.2-powerpc
(1.10/powerpc/Dockerfile)mips
, 1.10-mips
, 1.10.2-mips
(1.10/mips/Dockerfile)1.9-main
, 1.9.6-main
(1.9/main/Dockerfile)1.9-arm
, 1.9.6-arm
(1.9/arm/Dockerfile)1.9-powerpc
, 1.9.6-powerpc
(1.9/powerpc/Dockerfile)1.9-mips
, 1.9.6-mips
(1.9/mips/Dockerfile)Change the repository import path (-i
) and target platforms (-p
) according to your needs.
You can also use those images to run your tests by using the -T
option.
e: builder.sh [args]
,--import-path arg : Go import path of the project
,--platforms arg : List of platforms (GOOS/GOARCH) to build separated by a space
,--tests : Go run tests then exit
This building process is using make to build and run tests.
Therefore a Makefile
with build
and test
targets is needed into the root of your source files.
er run --rm -ti -v $(pwd):/app quay.io/prometheus/golang-builder:main \
-i "github.com/prometheus/prometheus" \
-p "linux/amd64 linux/386 darwin/amd64 darwin/386 windows/amd64 windows/386 freebsd/amd64 freebsd/386 openbsd/amd64 openbsd/386 netbsd/amd64 netbsd/386 dragonfly/amd64"
er run --rm -ti -v $(pwd):/app quay.io/prometheus/golang-builder:arm \
-i "github.com/prometheus/prometheus" \
-p "linux/arm linux/arm64 freebsd/arm openbsd/arm netbsd/arm"
er run --rm -ti -v $(pwd):/app quay.io/prometheus/golang-builder:powerpc \
-i "github.com/prometheus/prometheus" \
-p "linux/ppc64 linux/ppc64le"
mips64/mips64le cross-build is currently available with golang 1.6.
er run --rm -ti -v $(pwd):/app quay.io/prometheus/golang-builder:mips \
-i "github.com/prometheus/prometheus" \
-p "linux/mips64 linux/mips64le"
OSX/Darwin/Apple builds: Please ensure you have read and understood the Xcode license terms before continuing.
circle.yml
.#prometheus
channel on irc.freenode.net
.Refer to CONTRIBUTING.md
Apache License 2.0, see LICENSE.