2017-05-02 12:44:21 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2019-03-07 23:08:50 +00:00
|
|
|
docker run -i -v `pwd`:/postfix_exporter golang:1.12 /bin/sh << 'EOF'
|
2017-05-02 12:44:21 +00:00
|
|
|
set -ex
|
|
|
|
|
|
|
|
# Install prerequisites for the build process.
|
2018-02-02 10:51:33 +00:00
|
|
|
apt-get update -q
|
2019-03-07 23:08:50 +00:00
|
|
|
apt-get install -yq libsystemd-dev
|
2017-05-02 12:44:21 +00:00
|
|
|
|
|
|
|
cd /postfix_exporter
|
2018-02-02 10:51:33 +00:00
|
|
|
|
2017-05-02 12:44:21 +00:00
|
|
|
go get -d ./...
|
2019-03-07 23:08:50 +00:00
|
|
|
go build -a -tags static_all
|
2017-05-02 12:44:21 +00:00
|
|
|
strip postfix_exporter
|
|
|
|
EOF
|