diff --git a/README.md b/README.md index 37fbc72..ab62ef9 100644 --- a/README.md +++ b/README.md @@ -17,11 +17,15 @@ kube-bench supports the tests for multiple versions of Kubernetes (1.6, 1.7 and ## Installation -You can either install kube-bench through a dedicated container, install the latest binaries from the [Releases page](https://github.com/aquasecurity/kube-bench/releases), or compile it from source. +You can choose to +* run kube-bench from inside a container (sharing PID namespace with the host) +* run a container that installs kube-bench on the host, and then run kube-bench directly on the host +* install the latest binaries from the [Releases page](https://github.com/aquasecurity/kube-bench/releases), +* compile it from source. ### Running inside a container -You can avoid installing kube-bench entirely by running it inside a container using the host PID namespace. +You can avoid installing kube-bench on the host by running it inside a container using the host PID namespace. ``` docker run --pid=host aquasec/kube-bench:latest @@ -35,12 +39,12 @@ docker run --pid=host -v path/to/my-config.yaml:/opt/kube-bench/cfg/config.yaml ### Installing from a container -If you want to install a pre-built kube-bench, you can copy the kube-bench binary and configuration files to your host from the Docker container: +This command copies the kube-bench binary and configuration files to your host from the Docker container: ``` docker run --rm -v `pwd`:/host aquasec/kube-bench:latest install ``` -You can then run `./kube-bench `. This should work for any Linux distribution, including Alpine. +You can then run `./kube-bench `. ### Installing from sources diff --git a/entrypoint.sh b/entrypoint.sh index 43420e0..771b32d 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,8 +2,8 @@ if [ "$1" == "install" ]; then if [ -d /host ]; then mkdir -p /host/cfg/ - yes | cp -rf /cfg/* /host/cfg/ - yes | cp -rf /kube-bench /host/ + yes | cp -rf cfg/* /host/cfg/ + yes | cp -rf /usr/local/bin/kube-bench /host/ echo "===============================================" echo "kube-bench is now installed on your host " echo "Run ./kube-bench to perform a security check "