support and describe building static binaries

This commit is contained in:
Ross Kinder
2016-09-03 19:31:03 -04:00
parent 176078f607
commit db09fcec31
9 changed files with 199 additions and 9 deletions

15
Dockerfile.build Normal file
View File

@@ -0,0 +1,15 @@
FROM ubuntu
RUN apt-get update -yy && \
apt-get install -yy git make curl libxml2-dev libxmlsec1-dev pkg-config
RUN curl -s https://storage.googleapis.com/golang/go1.7.linux-amd64.tar.gz | tar -C /usr/local -xzf -
ENV GOPATH=/go
ENV PATH=$PATH:/usr/local/go/bin:/go/bin
RUN mkdir -p /go/bin
ADD . /go/src/github.com/crewjam/go-xmlsec
WORKDIR /go/src/github.com/crewjam/go-xmlsec
RUN go get github.com/crewjam/errset
RUN go build -o /bin/xmldsig ./examples/xmldsig.go
RUN ldd /bin/xmldsig || true
RUN /bin/xmldsig --help || true