1
0
mirror of https://github.com/aquasecurity/kube-bench.git synced 2024-12-24 07:28:06 +00:00

Merge pull request #74 from aquasecurity/multistage

Multistage build
This commit is contained in:
Liz Rice 2017-11-29 11:30:22 +00:00 committed by GitHub
commit a863cf87ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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