postfix_exporter/build_static.sh

16 lines
285 B
Bash
Raw Permalink Normal View History

#!/bin/sh
2021-08-31 18:27:41 +00:00
docker run -i -v `pwd`:/postfix_exporter golang:1.16 /bin/sh << 'EOF'
set -ex
# Install prerequisites for the build process.
apt-get update -q
apt-get install -yq libsystemd-dev
cd /postfix_exporter
go get -d ./...
go build -a -tags static_all
strip postfix_exporter
EOF