Skip to content
Snippets Groups Projects
Commit 7b538ed6 authored by Liz Rice's avatar Liz Rice
Browse files

Multistage build

parent 778c6620
No related branches found
No related tags found
No related merge requests found
FROM golang:1.8 FROM golang:1.9
WORKDIR /kube-bench WORKDIR /kube-bench
RUN go get github.com/aquasecurity/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 / 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 ENTRYPOINT /entrypoint.sh
# Build-time metadata as defined at http://label-schema.org # Build-time metadata as defined at http://label-schema.org
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment