build_static.sh updated to ubuntu docker container to support systemd journal usage.
This commit is contained in:
parent
0a26a0348b
commit
d0b229822e
@ -16,5 +16,8 @@ entries to a second file:
|
||||
mail.* -/var/log/postfix_exporter_input.log
|
||||
```
|
||||
|
||||
There is also an option to collect the metrics via the systemd journal instead of a log file.
|
||||
|
||||
|
||||
Please refer to this utility's `main()` function for a list of supported
|
||||
command line flags.
|
||||
|
@ -1,16 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
docker run -i -v `pwd`:/postfix_exporter alpine:edge /bin/sh << 'EOF'
|
||||
docker run -i -v `pwd`:/postfix_exporter ubuntu:16.04 /bin/sh << 'EOF'
|
||||
set -ex
|
||||
|
||||
# Install prerequisites for the build process.
|
||||
apk update
|
||||
apk add ca-certificates git go libc-dev
|
||||
update-ca-certificates
|
||||
apt-get update -q
|
||||
apt-get install -yq git golang-go libsystemd-dev
|
||||
|
||||
# Build the postfix_exporter.
|
||||
mkdir /go
|
||||
export GOPATH=/go
|
||||
cd /postfix_exporter
|
||||
export GOPATH=/gopath
|
||||
|
||||
go get -d ./...
|
||||
go build --ldflags '-extldflags "-static"'
|
||||
strip postfix_exporter
|
||||
|
Loading…
Reference in New Issue
Block a user