Unverified Commit b463be5d authored by Derek Wilson's avatar Derek Wilson Committed by GitHub
Browse files

Merge pull request #758 from underrun/remove-tmp-mount-in-docker-image

fix docker docs to remove extraneous mount
parents fcea4863 f2df1bea
......@@ -17,7 +17,7 @@ make docker-image
In order to run via docker, the `ks` process needs access to a kubernetes config file, certificates, and the current working directory. Pass in the `--mount` flag to capture the path of these files. Here's what it looks like running on a local cluster with minikube:
```bash
docker run -e KUBECONFIG="$HOME/.kube/config" --mount type=bind,source="$HOME/.kube/config",target="$HOME/.kube/config" --mount type=bind,source="$HOME/.minikube",target="$HOME/.minikube" --mount type=bind,source="/tmp",target="/tmp" --mount type=bind,source="$(pwd)",target="$(pwd)" --network host -w "$(pwd)" ks:v0.12.0 --help
docker run -e KUBECONFIG="$HOME/.kube/config" --mount type=bind,source="$HOME/.kube/config",target="$HOME/.kube/config" --mount type=bind,source="$HOME/.minikube",target="$HOME/.minikube" --mount type=bind,source="$(pwd)",target="$(pwd)" --network host -w "$(pwd)" ks:v0.12.0 --help
```
This sets the $KUBECONFIG environment variable inside the container, mounts the config and the directory holding certificates (which can be found inside the kubeconfig), and mounts the current working directory so that the `ks` binary knows where to work.
......@@ -25,5 +25,5 @@ This sets the $KUBECONFIG environment variable inside the container, mounts the
Optionally, set an alias to shorten the verbose command if using the docker image locally.
```bash
alias ks='docker run -e KUBECONFIG=/path/to/kube/config --mount type=bind,source=/path/to/kube/config,target=/path/to/kube/config --mount type=bind,source=/path/to/cert/dir,target=/path/to/cert/dir --mount type=bind,source="/tmp",target="/tmp" --mount type=bind,source="$(pwd)",target="$(pwd)" --network host -w "$(pwd)" ks:v0.12.0'
alias ks='docker run -e KUBECONFIG=/path/to/kube/config --mount type=bind,source=/path/to/kube/config,target=/path/to/kube/config --mount type=bind,source=/path/to/cert/dir,target=/path/to/cert/dir --mount type=bind,source="$(pwd)",target="$(pwd)" --network host -w "$(pwd)" ks:v0.12.0'
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment