mirror of
https://github.com/zyclonite/zerotier-docker.git
synced 2025-02-01 09:29:12 +01:00
fixed comments
This commit is contained in:
parent
015fbce7c9
commit
467f991907
@ -1,19 +1,12 @@
|
|||||||
ARG ALPINE_IMAGE=alpine
|
FROM zyclonite/zerotier:latest
|
||||||
ARG ALPINE_VERSION=3.15
|
|
||||||
ARG ZT_COMMIT=eac56a2e25bbd27f77505cbd0c21b86abdfbd36b
|
|
||||||
ARG ZT_VERSION=1.8.4
|
|
||||||
|
|
||||||
FROM zyclonite/zerotier
|
|
||||||
|
|
||||||
RUN apk add --no-cache --purge --clean-protected --update supervisor iptables \
|
RUN apk add --no-cache --purge --clean-protected --update supervisor iptables \
|
||||||
&& mkdir -p /var/log/supervisor \
|
&& mkdir -p /var/log/supervisor \
|
||||||
&& rm -rf /var/cache/apk/*
|
&& rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
ENV LOG_PATH=/var/log/supervisor \
|
ENV LOG_PATH=/var/log/supervisor
|
||||||
BRIDGE=false
|
|
||||||
|
|
||||||
COPY conf /opt
|
COPY conf scripts /opt
|
||||||
COPY scripts /opt
|
|
||||||
|
|
||||||
EXPOSE 9993/udp
|
EXPOSE 9993/udp
|
||||||
|
|
||||||
|
@ -35,11 +35,9 @@ or create an empty file with the network as name
|
|||||||
#### Bridge mode
|
#### 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)
|
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 \
|
||||||
|
|
||||||
docker run --name zerotier-one --device=/dev/net/tun -e BRIDGE=true \
|
|
||||||
--cap-add=NET_ADMIN --cap-add=SYS_ADMIN \
|
--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.
|
That will start the zero-one, establish connection and build the bridge once the `zt` interface is up.
|
||||||
|
|
||||||
|
@ -25,10 +25,7 @@ spec:
|
|||||||
|
|
||||||
containers:
|
containers:
|
||||||
- name: zerotier
|
- name: zerotier
|
||||||
image: zyclonite/zerotier-bridge:latest
|
image: zyclonite/zerotier:bridge
|
||||||
env:
|
|
||||||
- name: BRIDGE
|
|
||||||
value: "true"
|
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
memory: "128Mi"
|
memory: "128Mi"
|
||||||
|
@ -5,12 +5,6 @@ set -o pipefail
|
|||||||
set -o nounset
|
set -o nounset
|
||||||
# set -o xtrace
|
# 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..."
|
echo "Waiting for network interface to be ready..."
|
||||||
|
|
||||||
while ! ifconfig | grep -q zt; do
|
while ! ifconfig | grep -q zt; do
|
||||||
|
Loading…
Reference in New Issue
Block a user