mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-23 03:21:28 +01:00
107fe229d4
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
24 lines
540 B
Docker
24 lines
540 B
Docker
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" ]
|