mirror of
https://github.com/xubiaolin/docker-zerotier-planet.git
synced 2025-01-22 12:48:14 -05:00
19 lines
418 B
Bash
Executable File
19 lines
418 B
Bash
Executable File
#!/bin/sh
|
|
imageName="zerotier-planet"
|
|
|
|
|
|
echo "清除原有内容"
|
|
rm /opt/planet
|
|
docker stop $imageName
|
|
docker rm $imageName
|
|
docker rmi $imageName
|
|
|
|
|
|
echo "打包镜像"
|
|
docker build --network host -t $imageName .
|
|
|
|
echo "启动服务"
|
|
for i in $(lsof -i:9993 -t);do kill -2 $i;done
|
|
docker run -d --network host --name $imageName --restart unless-stopped $imageName
|
|
docker cp zerotier-planet:/app/bin/planet /opt/planet
|