forked from jessfraz/dockerfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jess Frazelle <[email protected]>
- Loading branch information
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM golang:alpine as builder | ||
MAINTAINER Jessica Frazelle <[email protected]> | ||
|
||
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" ] |