mirror of
https://github.com/xubiaolin/docker-zerotier-planet.git
synced 2026-01-12 21:06:59 +08:00
Refactor Dockerfile and GitHub Actions workflow for improved ZeroTier build process
- Updated Dockerfile to ensure proper initialization and cleanup of zerotier-one service - Changed working directory path for mkworld build process - Added creation of /var/lib/zerotier-one directory - Modified image-build.yml to use TAG instead of DERP_VERSION for build arguments
This commit is contained in:
2
.github/workflows/image-build.yml
vendored
2
.github/workflows/image-build.yml
vendored
@@ -40,4 +40,4 @@ jobs:
|
|||||||
${{ secrets.DOCKERHUB_USERNAME }}/zerotier-planet-test:latest
|
${{ secrets.DOCKERHUB_USERNAME }}/zerotier-planet-test:latest
|
||||||
${{ secrets.DOCKERHUB_USERNAME }}/zerotier-planet-test:${{ steps.get_tag.outputs.latest_tag }}
|
${{ secrets.DOCKERHUB_USERNAME }}/zerotier-planet-test:${{ steps.get_tag.outputs.latest_tag }}
|
||||||
build-args: |
|
build-args: |
|
||||||
DERP_VERSION=${{ steps.get_tag.outputs.latest_tag }}
|
TAG=${{ steps.get_tag.outputs.latest_tag }}
|
||||||
@@ -27,14 +27,16 @@ RUN set -x\
|
|||||||
&& make -j\
|
&& make -j\
|
||||||
&& make install\
|
&& make install\
|
||||||
&& echo "make success!"\
|
&& echo "make success!"\
|
||||||
; zerotier-one -d \
|
&& zerotier-one -d || true\
|
||||||
; sleep 5s && ps -ef |grep zerotier-one |grep -v grep |awk '{print $1}' |xargs kill -9\
|
&& sleep 5s\
|
||||||
|
&& (ps -ef |grep zerotier-one |grep -v grep |awk '{print $1}' |xargs kill -9 || true)\
|
||||||
&& echo "zerotier-one init success!"\
|
&& echo "zerotier-one init success!"\
|
||||||
&& cd ./attic/world \
|
&& cd /app/ZeroTierOne/attic/world \
|
||||||
&& cp /app/patch/mkworld_custom.cpp .\
|
&& cp /app/patch/mkworld_custom.cpp .\
|
||||||
&& mv mkworld.cpp mkworld.cpp.bak \
|
&& mv mkworld.cpp mkworld.cpp.bak \
|
||||||
&& mv mkworld_custom.cpp mkworld.cpp \
|
&& mv mkworld_custom.cpp mkworld.cpp \
|
||||||
&& sh build.sh \
|
&& sh build.sh \
|
||||||
|
&& mkdir -p /var/lib/zerotier-one \
|
||||||
&& mv mkworld /var/lib/zerotier-one\
|
&& mv mkworld /var/lib/zerotier-one\
|
||||||
&& echo "mkworld build success!"
|
&& echo "mkworld build success!"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user