1
0
mirror of https://github.com/aquasecurity/kube-bench.git synced 2024-11-21 23:58:06 +00:00

Changed Dockerfile with new Github project name.

The Github project name was changed to "kube-bench" so there was a need to modify
Dockerfile references.
Also modified the text output of the entrypoint to be friendlier.
This commit is contained in:
Amir Jerbi 2017-06-20 10:42:37 +03:00
parent 3bafeac47c
commit e03f5c846f
2 changed files with 11 additions and 8 deletions

View File

@ -1,16 +1,16 @@
FROM golang:1.4.1
RUN mkdir /kube-bench
WORKDIR /kube-bench
RUN wget https://raw.githubusercontent.com/aquasecurity/kubernetes-bench-security/master/cfg/config.yaml && \
wget https://raw.githubusercontent.com/aquasecurity/kubernetes-bench-security/master/cfg/federated.yaml && \
wget https://raw.githubusercontent.com/aquasecurity/kubernetes-bench-security/master/cfg/master.yaml && \
wget https://raw.githubusercontent.com/aquasecurity/kubernetes-bench-security/master/cfg/node.yaml
RUN go get github.com/aquasecurity/kubernetes-bench-security
RUN cp /go/bin/kubernetes-bench-security /kube-bench/ && chmod +x /kube-bench/kubernetes-bench-security
RUN wget https://raw.githubusercontent.com/aquasecurity/kube-bench/master/cfg/config.yaml && \
wget https://raw.githubusercontent.com/aquasecurity/kube-bench/master/cfg/federated.yaml && \
wget https://raw.githubusercontent.com/aquasecurity/kube-bench/master/cfg/master.yaml && \
wget https://raw.githubusercontent.com/aquasecurity/kube-bench/master/cfg/node.yaml
RUN go get github.com/aquasecurity/kube-bench
RUN cp /go/bin/kubernetes-bench /kube-bench/ && chmod +x /kube-bench/kube-bench
FROM alpine:latest
RUN mkdir -p /kube-bench/cfg
COPY --from=0 /kube-bench/kubernetes-bench-security /kube-bench/kube-bench
COPY --from=0 /kube-bench/kube-bench /kube-bench/kube-bench
COPY --from=0 /kube-bench/config.yaml /kube-bench/cfg/config.yaml
COPY --from=0 /kube-bench/federated.yaml /kube-bench/cfg/federated.yaml
COPY --from=0 /kube-bench/master.yaml /kube-bench/cfg/master.yaml

View File

@ -3,7 +3,10 @@ if [ -d /host ]; then
mkdir -p /host/cfg/
yes | cp -rf ./kube-bench/cfg/* /host/cfg/
yes | cp -rf ./kube-bench/kube-bench /host/
echo "=== You can now run ./kube-bench from your host ==="
echo "==============================================="
echo "kube-bench is now installed on your host "
echo "Run ./kube-bench to perform a security check "
echo "==============================================="
else
echo "Usage:"
echo " docker run --rm -v \`pwd\`:/host aquasec/kube-bench"