fix missing docker volume
This commit is contained in:
parent
f59b3fca11
commit
6890cfe6c4
1 changed files with 2 additions and 0 deletions
|
@ -2,6 +2,8 @@
|
|||
|
||||
set -ex
|
||||
|
||||
docker volume create k3s-server
|
||||
|
||||
docker run -d --privileged --tmpfs /run --tmpfs /var/run --restart always -e K3S_TOKEN=12345678901234 -e K3S_KUBECONFIG_OUTPUT=./kubeconfig.yaml -e K3S_KUBECONFIG_MODE=666 -v k3s-server:/var/lib/rancher/k3s:z -v $(pwd):/output:z -p 6443:6443 -p 80:80 -p 443:443 rancher/k3s server --cluster-init
|
||||
|
||||
export timeout=60; while [ ! -f /var/lib/docker/volumes/k3s-server/_data/server/kubeconfig.yaml ]; do if [ "$timeout" == 0 ]; then echo "ERROR: Timeout while waiting for file."; break; fi; sleep 1; ((timeout--)); done
|
||||
|
|
Loading…
Reference in a new issue