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.
closes jessfraz#414 Signed-off-by: Jess Frazelle <[email protected]>
- Loading branch information
Showing
1 changed file
with
11 additions
and
21 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 |
---|---|---|
@@ -1,30 +1,20 @@ | ||
FROM alpine:latest | ||
FROM golang:alpine as builder | ||
LABEL maintainer "Jessie Frazelle <[email protected]>" | ||
|
||
RUN apk --no-cache add \ | ||
ca-certificates \ | ||
gcc \ | ||
git \ | ||
libc-dev | ||
|
||
ENV PATH /go/bin:/usr/local/go/bin:$PATH | ||
ENV GOPATH /go | ||
ENV GO15VENDOREXPERIMENT 1 | ||
|
||
RUN apk update && apk add \ | ||
ca-certificates \ | ||
&& rm -rf /var/cache/apk/* | ||
RUN go get github.com/sourcegraph/checkup/cmd/checkup | ||
|
||
RUN buildDeps=' \ | ||
go \ | ||
git \ | ||
gcc \ | ||
libc-dev \ | ||
libgcc \ | ||
' \ | ||
set -x \ | ||
&& apk update \ | ||
&& apk add --no-cache --repository https://dl-3.alpinelinux.org/alpine/edge/community $buildDeps \ | ||
&& go get github.com/sourcegraph/checkup/cmd/checkup \ | ||
&& cp /go/bin/checkup /usr/bin/checkup \ | ||
&& apk del $buildDeps \ | ||
&& rm -rf /var/cache/apk/* \ | ||
&& rm -rf /go \ | ||
&& echo "Build complete." | ||
FROM alpine:latest | ||
|
||
COPY --from=builder /go/bin/checkup /usr/bin/checkup | ||
COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs | ||
|
||
ENTRYPOINT [ "checkup" ] |