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

Merge pull request #754 from underrun/fix-docker-docs

fix docker docs by adding net info
parents 8d3d6c25 49e95278
......@@ -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="~/.kube/config" --mount type=bind,source="~/.kube/config",target="~/.kube/config" --mount type=bind,source="~/.minikube",target="~/.minikube" --mount type=bind,source="$(pwd)",target="$(pwd)" -w "$(pwd)" ks --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="/tmp",target="/tmp" --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="$(pwd)",target="$(pwd)" -w "$(pwd)" ks'
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'
```
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