From ef3ead938e6b60b8ae8b7371f76e33aaf7639d48 Mon Sep 17 00:00:00 2001 From: Jess Frazelle Date: Fri, 14 Sep 2018 15:31:15 -0400 Subject: [PATCH] checkup update closes #414 Signed-off-by: Jess Frazelle --- checkup/Dockerfile | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/checkup/Dockerfile b/checkup/Dockerfile index c4f289f..0bc5fc7 100644 --- a/checkup/Dockerfile +++ b/checkup/Dockerfile @@ -1,30 +1,20 @@ -FROM alpine:latest +FROM golang:alpine as builder LABEL maintainer "Jessie Frazelle " +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" ]