mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
20 lines
682 B
Bash
20 lines
682 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
cd $(dirname $0)/..
|
||
|
IP=$(ip addr show dev docker0 | grep -w inet | awk '{print $2}' | cut -f1 -d/)
|
||
|
docker run \
|
||
|
--read-only \
|
||
|
--tmpfs /run \
|
||
|
--tmpfs /var/run \
|
||
|
--tmpfs /tmp \
|
||
|
-v /lib/modules:/lib/modules:ro \
|
||
|
-v /lib/firmware:/lib/firmware:ro \
|
||
|
-v /etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt:ro \
|
||
|
-v $(pwd)/bin:/usr/bin \
|
||
|
-v /var/log \
|
||
|
-v /var/lib/rancher/k3s \
|
||
|
-v /var/lib/cni \
|
||
|
-v /usr/lib/x86_64-linux-gnu/libsqlite3.so.0:/usr/lib/x86_64-linux-gnu/libsqlite3.so.0:ro \
|
||
|
--privileged \
|
||
|
ubuntu:18.04 /usr/bin/k3s-agent agent -t $(<~/.rancher/k3s/server/node-token) -s https://${IP}:6443
|