File tree Expand file tree Collapse file tree 3 files changed +12
-18
lines changed Expand file tree Collapse file tree 3 files changed +12
-18
lines changed Original file line number Diff line number Diff line change 1
- FROM alpine:3.13 as builder
1
+ FROM alpine:3.14
2
2
3
- ARG ZT_COMMIT=e8f7d5ef9e7ba6be0b2163cfa31f8817ba5b18f4
4
-
5
- RUN apk add --update alpine-sdk linux-headers \
6
- && git clone --quiet https://github.com/zerotier/ZeroTierOne.git /src \
7
- && git -C src reset --quiet --hard ${ZT_COMMIT} \
8
- && cd /src \
9
- && make -f make-linux.mk
10
-
11
- FROM alpine:3.13
12
3
LABEL version="1.6.5"
13
4
LABEL description="ZeroTier One moon as Docker Image"
14
5
15
- RUN apk add --update -- no-cache libc6-compat libstdc++
6
+ RUN apk add --no-cache zerotier-one=1.6.5-r0
16
7
8
+ # ZeroTier relies on UDP port 9993
17
9
EXPOSE 9993/udp
18
10
19
- COPY --from=builder /src/zerotier-one /usr/sbin/
20
- RUN mkdir -p /var/lib/zerotier-one \
21
- && ln -s /usr/sbin/zerotier-one /usr/sbin/zerotier-idtool \
22
- && ln -s /usr/sbin/zerotier-one /usr/sbin/zerotier-cli
23
-
24
11
COPY start-moon.sh /start-moon.sh
25
12
26
13
ENTRYPOINT ["/start-moon.sh" ]
Original file line number Diff line number Diff line change 1
- version : ' 3.5'
1
+ version : " 3.5"
2
2
3
3
services :
4
4
zerotier-moon :
5
5
image : gythialy/zerotier-one-moon:lastest
6
6
container_name : zerotier-moon
7
+ cap_add :
8
+ - NET_ADMIN
9
+ - SYS_ADMIN
10
+ devices :
11
+ - /dev/net/tun
7
12
ports :
8
13
- 9993:9993/udp
9
14
command :
Original file line number Diff line number Diff line change 3
3
# borrowed from https://github.com/rwv/docker-zerotier-moon
4
4
# usage ./start-moon.sh -4 1.2.3.4 -6 2001:abcd:abcd::1 -p 9993
5
5
6
+ export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin
7
+
6
8
moon_port=9993 # default ZeroTier moon port
7
9
8
10
while getopts " 4:6:p:" arg; do # handle args
@@ -43,7 +45,7 @@ else # ipv4 address is set
43
45
fi
44
46
45
47
# trim whitespace
46
- stableEndpointsForSed=" $( echo -e " ${stableEndpointsForSed} " | tr -d ' [:space:]' ) "
48
+ stableEndpointsForSed=" $( echo " ${stableEndpointsForSed} " | tr -d ' [:space:]' ) "
47
49
echo " stableEndpoints: $stableEndpointsForSed "
48
50
49
51
if [ -d " /var/lib/zerotier-one/moons.d" ]; then # check if the moons conf has generated
You can’t perform that action at this time.
0 commit comments