From 42f479596c6dde0bf956c08b966218876cdbfea6 Mon Sep 17 00:00:00 2001 From: Dave Hay Date: Wed, 7 Jul 2021 08:56:33 +0100 Subject: [PATCH] doc(install): Adding detail and example for build (#928) - Added to the `Installing from sources` - Includes `git clone` etc. - Also includes comments Signed-off-by: Dave Hay --- docs/installation.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/installation.md b/docs/installation.md index 789b760..6d42c0c 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -53,11 +53,22 @@ See previous section on [Running kube-bench](./running.md#running-kube-bench) fo ### Installing from sources -If Go is installed on the target machines, you can simply clone this repository and run as follows (assuming your [`GOPATH` is set](https://github.com/golang/go/wiki/GOPATH)): +If Go is installed on the target machines, you can simply clone this repository and run as follows (assuming your [`GOPATH` is set](https://github.com/golang/go/wiki/GOPATH)) as per this example: ```shell +# Create a target directory for the clone, inside the $GOPATH +mkdir -p $GOPATH/src/github.com/aquasecurity/kube-bench + +# Clone this repository, using SSH +git clone git@github.com:aquasecurity/kube-bench.git $GOPATH/src/github.com/aquasecurity/kube-bench + +# Install the pre-requisites go get github.com/aquasecurity/kube-bench + +# Change to the kube-bench directory cd $GOPATH/src/github.com/aquasecurity/kube-bench + +# Build the kube-bench binary go build -o kube-bench . # See all supported options