mirror of
https://github.com/xubiaolin/docker-zerotier-planet.git
synced 2025-01-22 12:48:14 -05:00
feat: 🎸 增加一键启动脚本
This commit is contained in:
parent
2db2583445
commit
64a6a1ae3e
@ -1,6 +1,6 @@
|
||||
FROM alpine:latest
|
||||
|
||||
ADD ./run.sh /app/
|
||||
ADD ./server.sh /app/
|
||||
ADD ./patch /opt/patch/
|
||||
|
||||
VOLUME ["/var/lib/zerotier-one/"]
|
||||
@ -39,4 +39,4 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/re
|
||||
sh build.sh
|
||||
|
||||
WORKDIR /app/
|
||||
CMD ["sh","./run.sh"]
|
||||
CMD ["sh","./server.sh"]
|
||||
|
15
deploy.sh
Normal file
15
deploy.sh
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
imageName="zerotier-planet"
|
||||
|
||||
echo "清除原有内容"
|
||||
rm -rf /opt/$imageName
|
||||
docker stop $imageName
|
||||
docker rm $imageName
|
||||
docker rmi $imageName
|
||||
|
||||
echo "打包镜像"
|
||||
docker build -t $imageName:latest .
|
||||
|
||||
echo "启动服务"
|
||||
for i in $(lsof -i:9993 -t);do kill -2 $i;done
|
||||
docker run -d --name $imageName -p 3443:3443 -p 9993:9993 -p 9993:9993/udp -v /opt/$imageName:/var/lib/zerotier-one --restart unless-stopped $imageName:latest
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"stableEndpoints": [
|
||||
"81.70.255.9/9993"
|
||||
"82.157.68.236/9993"
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user