This commit is contained in:
DESKTOP-MARKXU\xubia 2021-11-10 01:06:57 +08:00
parent d1506a9ac2
commit 6bea7d79ed
2 changed files with 7 additions and 7 deletions

View File

@ -1,6 +1,6 @@
FROM centos:7
WORKDIR /opt/ztncui/src
WORKDIR /var/lib/zerotier-one/
COPY . /var/lib/zerotier-one/
VOLUME ["/opt","/var/lib/zerotier-one"]
EXPOSE 9993
@ -27,12 +27,13 @@ RUN curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Ce
cd /opt &&\
curl -sL https://rpm.nodesource.com/setup_10.x | bash - &&\
yum install nodejs -y &&\
rm -rf ztncui/ &&\
git clone https://github.com.cnpmjs.org/key-networks/ztncui.git &&\
cd ztncui/src&&\
cd ztncui/src &&\
npm install -g node-gyp &&\
npm install
sh -c "echo 'HTTP_PORT=3443' > .env"
sh -c "echo 'NODE_ENV=production' >> .env"
npm install &&\
sh -c "echo 'HTTP_PORT=3443' > .env"&&\
sh -c "echo 'NODE_ENV=production' >> .env"&&\
# 配置补丁
cd /var/lib/zerotier-one && \
@ -46,7 +47,7 @@ RUN curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Ce
sh build.sh &&\
mv world.bin /var/lib/zerotier-one/planet
CMD [ "bash","npm start" ]
CMD [ "bash","run.sh" ]

1
run.sh
View File

@ -1,3 +1,2 @@
#!/bin/bash
zerotier-cli -d
cd /opt/ztncui/src && npm start