mirror of
https://github.com/zyclonite/zerotier-docker.git
synced 2025-01-20 20:18:35 +01:00
fixed comments
This commit is contained in:
parent
015fbce7c9
commit
467f991907
@ -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
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user