Add a build script for the Postfix exporter.
This commit is contained in:
parent
c4e1ef1c0e
commit
2e75bb4583
17
build_static.sh
Executable file
17
build_static.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
docker run -i -v `pwd`:/postfix_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 postfix_exporter.
|
||||
cd /postfix_exporter
|
||||
export GOPATH=/gopath
|
||||
go get -d ./...
|
||||
go build --ldflags '-extldflags "-static"'
|
||||
strip postfix_exporter
|
||||
EOF
|
Loading…
Reference in New Issue
Block a user