diff --git a/Dockerfile.bridge b/Dockerfile.bridge index 129cb6b..6f3eb02 100644 --- a/Dockerfile.bridge +++ b/Dockerfile.bridge @@ -1,19 +1,12 @@ -ARG ALPINE_IMAGE=alpine -ARG ALPINE_VERSION=3.15 -ARG ZT_COMMIT=eac56a2e25bbd27f77505cbd0c21b86abdfbd36b -ARG ZT_VERSION=1.8.4 - -FROM zyclonite/zerotier +FROM zyclonite/zerotier:latest RUN apk add --no-cache --purge --clean-protected --update supervisor iptables \ && mkdir -p /var/log/supervisor \ && rm -rf /var/cache/apk/* -ENV LOG_PATH=/var/log/supervisor \ - BRIDGE=false +ENV LOG_PATH=/var/log/supervisor -COPY conf /opt -COPY scripts /opt +COPY conf scripts /opt EXPOSE 9993/udp diff --git a/README.md b/README.md index a692ce8..c240c2c 100644 --- a/README.md +++ b/README.md @@ -35,11 +35,9 @@ or create an empty file with the network as name #### Bridge mode It is the implementation of the local network bridge [paper](https://zerotier.atlassian.net/wiki/spaces/SD/pages/193134593/Bridge+your+ZeroTier+and+local+network+with+a+RaspberryPi) -To enable it, remove the host network parameter and add `Bridge=true` to environment variables. - - docker run --name zerotier-one --device=/dev/net/tun -e BRIDGE=true \ + docker run --name zerotier-one --device=/dev/net/tun \ --cap-add=NET_ADMIN --cap-add=SYS_ADMIN \ - -v /var/lib/zerotier-one:/var/lib/zerotier-one zyclonite/zerotier-bridge + -v /var/lib/zerotier-one:/var/lib/zerotier-one zyclonite/zerotier:bridge That will start the zero-one, establish connection and build the bridge once the `zt` interface is up. diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index 6a1b765..790f0d2 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -25,10 +25,7 @@ spec: containers: - name: zerotier - image: zyclonite/zerotier-bridge:latest - env: - - name: BRIDGE - value: "true" + image: zyclonite/zerotier:bridge resources: limits: memory: "128Mi" diff --git a/scripts/bridge.sh b/scripts/bridge.sh index 20ef792..5ed3bd3 100755 --- a/scripts/bridge.sh +++ b/scripts/bridge.sh @@ -5,12 +5,6 @@ set -o pipefail set -o nounset # set -o xtrace -echo "Checking if bridge is required..." -if [ "$BRIDGE" = "false" ]; then - echo "Bridge is not required. Exiting..." - exit 0 -fi -echo "Bridge is required. Starting..." echo "Waiting for network interface to be ready..." while ! ifconfig | grep -q zt; do