From 7b538ed6e41585c87af1da34c4ebca4430c535d0 Mon Sep 17 00:00:00 2001 From: Liz Rice Date: Mon, 27 Nov 2017 11:51:20 +0000 Subject: [PATCH] Multistage build --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 241f265..115f429 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ -FROM golang:1.8 +FROM golang:1.9 WORKDIR /kube-bench RUN go get github.com/aquasecurity/kube-bench -RUN cp /go/bin/kube-bench /kube-bench/ && chmod +x /kube-bench/kube-bench -RUN cp -r /go/src/github.com/aquasecurity/kube-bench/cfg cfg -# When Docker Hub supports it, we would split this into a multi-stage build with the second part based on, say, alpine for size +FROM alpine:latest WORKDIR / -ADD entrypoint.sh /entrypoint.sh +COPY --from=0 /go/bin/kube-bench /kube-bench +COPY cfg cfg +COPY entrypoint.sh /entrypoint.sh ENTRYPOINT /entrypoint.sh # Build-time metadata as defined at http://label-schema.org