add viewdocs

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
Jess Frazelle 2018-07-14 17:02:19 -04:00
parent babf3fb6c3
commit 107fe229d4
No known key found for this signature in database
GPG Key ID: 18F3685C0022BFF3

23
viewdocs/Dockerfile Normal file
View File

@ -0,0 +1,23 @@
FROM golang:alpine as builder
MAINTAINER Jessica Frazelle <jess@linux.com>
ENV PATH /go/bin:/usr/local/go/bin:$PATH
ENV GOPATH /go
RUN apk add --no-cache \
ca-certificates \
git
RUN go get github.com/progrium/viewdocs
WORKDIR /go/src/github.com/progrium/viewdocs
RUN CGO_ENABLED=0 go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o /usr/bin/viewdocs *.go
FROM scratch
COPY --from=builder /usr/bin/viewdocs /usr/bin/viewdocs
COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs
ENTRYPOINT [ "viewdocs" ]
CMD [ "--help" ]