build.sh 439 B

1234567891011121314
  1. #!/bin/sh
  2. set -e
  3. apk add --update go build-base git mercurial ca-certificates
  4. mkdir -p /go/src/github.com/gliderlabs
  5. cp -r /src /go/src/github.com/gliderlabs/logspout
  6. cd /go/src/github.com/gliderlabs/logspout
  7. export GOPATH=/go
  8. go get
  9. go build -ldflags "-X main.Version=$1" -o /bin/logspout
  10. apk del go git mercurial build-base
  11. rm -rf /go /var/cache/apk/* /root/.glide
  12. # backwards compatibility
  13. ln -fs /tmp/docker.sock /var/run/docker.sock