1 Star 0 Fork 0

color_ming/docker-zerotier-planet

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Dockerfile 2.11 KB
一键复制 编辑 原始数据 按行查看 历史
xubiaolin 提交于 2024-03-08 02:06 . updatemirror
FROM alpine:3.14 as builder
ENV TZ=Asia/Shanghai
ARG TAG=main
ENV TAG=${TAG}
WORKDIR /app
ADD ./entrypoint.sh /app/entrypoint.sh
ADD ./http_server.js /app/http_server.js
ADD ./mkmoonworld-x86_64 /app/mkmoonworld-x86_64
# init tool
RUN set -x\
&& apk update\
&& apk add --no-cache git python3 npm make g++ linux-headers curl pkgconfig openssl-dev jq build-base gcc \
&& echo "env prepare success!"
# make zerotier-one
RUN set -x\
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y\
&& source "$HOME/.cargo/env"\
&& git clone https://github.com/zerotier/ZeroTierOne.git\
&& cd ZeroTierOne\
&& git checkout ${TAG}\
&& echo "切换到tag:${TAG}"\
&& make ZT_SYMLINK=1 \
&& make\
&& make install\
&& echo "make success!"\
; zerotier-one -d \
; sleep 5s && ps -ef |grep zerotier-one |grep -v grep |awk '{print $1}' |xargs kill -9\
&& echo "zerotier-one init success!"
#make ztncui
RUN set -x \
&& mkdir /app -p \
&& cd /app \
&& git clone --progress https://ghproxy.imoyuapp.win/https://github.com/key-networks/ztncui.git\
&& cd /app/ztncui/src \
&& npm config set registry https://registry.npmmirror.com\
&& npm install -g node-gyp\
&& npm install
FROM alpine:3.14
WORKDIR /app
ENV IP_ADDR4=''
ENV IP_ADDR6=''
ENV ZT_PORT=9994
ENV API_PORT=3443
ENV FILE_SERVER_PORT=3000
ENV GH_MIRROR="https://ghproxy.imoyuapp.win/"
ENV FILE_KEY=''
ENV TZ=Asia/Shanghai
COPY --from=builder /app/ztncui /bak/ztncui
COPY --from=builder /var/lib/zerotier-one /bak/zerotier-one
COPY --from=builder /app/ZeroTierOne/zerotier-one /usr/sbin/zerotier-one
COPY --from=builder /app/entrypoint.sh /app/entrypoint.sh
COPY --from=builder /app/http_server.js /app/http_server.js
COPY --from=builder /app/mkmoonworld-x86_64 /app/mkmoonworld-x86_64
RUN set -x ;sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \
&& apk update \
&& apk add --no-cache npm curl jq openssl\
&& mkdir /app/config -p
VOLUME [ "/app/dist","/app/ztncui","/var/lib/zerotier-one","/app/config"]
CMD ["/bin/sh","/app/entrypoint.sh"]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/color_pm0_sir/docker-zerotier-planet.git
git@gitee.com:color_pm0_sir/docker-zerotier-planet.git
color_pm0_sir
docker-zerotier-planet
docker-zerotier-planet
master

搜索帮助