diff --git a/doc/ext/kubernetes/Dockerfile b/doc/ext/kubernetes/Dockerfile index c33b6babc..74af6c1ac 100644 --- a/doc/ext/kubernetes/Dockerfile +++ b/doc/ext/kubernetes/Dockerfile @@ -6,7 +6,7 @@ RUN mkdir -p /var/lib/zerotier-one/networks.d ADD *.conf /var/lib/zerotier-one/networks.d/ ADD zerotier / ADD zerotier-cli / -ADD .zerotierCliSettings /root/ +ADD .zerotierCliSettings / # Install App ADD server.js / diff --git a/doc/ext/kubernetes/entrypoint.sh b/doc/ext/kubernetes/entrypoint.sh index 8ec7312aa..881d92cfa 100644 --- a/doc/ext/kubernetes/entrypoint.sh +++ b/doc/ext/kubernetes/entrypoint.sh @@ -13,9 +13,9 @@ echo '*** Up and running at' $virtip4 ' on network: ' $nwid echo '*** Self-Authorizing to deployment network' nwconf=$(ls *.conf) nwid="${nwconf%.*}" -AUTHTOKEN="(cat /var/lib/zerotier-one/authtoken.secret)" -grep -rl 'local_service_auth_token' ./ | xargs sed -i 's/local_service_auth_token/' $AUTHTOKEN '/g' +AUTHTOKEN=$(cat /var/lib/zerotier-one/authtoken.secret) +sed "s|\local_service_auth_token|${AUTHTOKEN}|" .zerotierCliSettings > /root/.zerotierCliSettings ./zerotier-cli join $(nwid).conf ./zerotier-cli net-auth $(nwid) $(dev)