github.com/khulnasoft-lab/kube-bench@v0.2.1-0.20240330183753-9df52345ae58/entrypoint.sh (about)

     1  #!/bin/sh -e
     2  if [ "$1" == "install" ]; then
     3    if [ -d /host ]; then
     4      mkdir -p /host/cfg/
     5      yes | cp -rf cfg/* /host/cfg/
     6      yes | cp -rf /usr/local/bin/kube-bench /host/
     7      echo "==============================================="
     8      echo "kube-bench is now installed on your host       "
     9      echo "Run ./kube-bench to perform a security check   "
    10      echo "==============================================="
    11    else
    12      echo "Usage:"
    13      echo "  install: docker run --rm -v \`pwd\`:/host khulnasoft/kube-bench install"
    14      echo "  run:     docker run --rm --pid=host khulnasoft/kube-bench [command]"
    15      exit
    16    fi
    17  else
    18    exec kube-bench "$@"
    19  fi