Commit f4ca2a36 authored by Ed Schouten's avatar Ed Schouten
Browse files

Add a nifty script for building statically linked binaries.

We use this script at Kumina to generate binaries that we can deploy to
a wide variety of Linux systems. Let's keep this in the tree, like we do
for some of our other exporters.
parent a571ffd5
#!/bin/sh
docker run -i -v `pwd`:/dovecot_exporter alpine:edge /bin/sh << 'EOF'
set -ex
# Install prerequisites for the build process.
apk update
apk add ca-certificates git go libc-dev
update-ca-certificates
# Build the dovecot_exporter.
cd /dovecot_exporter
export GOPATH=/gopath
go get -d ./...
go build --ldflags '-extldflags "-static"'
strip dovecot_exporter
EOF
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment