Skip to content
Snippets Groups Projects
Select Git revision
  • 81b443db7f3b5acd882f921e64e7a107cf6c4ac9
  • master default protected
  • lintian-fixes
3 results

build_static.sh

Blame
  • Forked from ai3 / thirdparty / dovecot-exporter
    Source project has a limited visibility.
    build_static.sh 370 B
    #!/bin/sh
    
    docker run -i -v `pwd`:/dovecot_exporter alpine:3.8 /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