From 6e5701ed19cb80e3e99bfa406b5fec7be516ea5b Mon Sep 17 00:00:00 2001 From: xubiaolin Date: Fri, 19 Aug 2022 20:02:01 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20=E4=BF=AE=E6=94=B9docker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 603a061..a1f1ffa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,12 +14,19 @@ RUN echo "deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse\ deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse\ deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse" >/etc/apt/sources.list \ - && apt update && apt install -y tzdata && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime && echo ${TZ} >/etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata \ - && apt-get clean && rm -rf /var/lib/apt/lists/* \ + && apt update \ + && apt install -y tzdata \ + && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \ + && echo ${TZ} >/etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* \ + && apt update \ && apt install git python3 npm make curl wget -y \ && mkdir /usr/include/nlohmann/ \ - && cd /usr/include/nlohmann/ && wget https://github.com/nlohmann/json/releases/download/v3.10.5/json.hpp \ - && npm config set registry http://registry.npm.taobao.org && npm install -g node-gyp + && cd /usr/include/nlohmann/ \ + && wget https://github.com/nlohmann/json/releases/download/v3.10.5/json.hpp \ + && npm config set registry http://registry.npm.taobao.org \ + && npm install -g node-gyp RUN curl -s https://install.zerotier.com | bash \ && cd /opt && git clone -v http://gh-proxy.markxu.vip/https://github.com/key-networks/ztncui.git --depth 1 \ @@ -39,6 +46,6 @@ RUN cd /var/lib/zerotier-one && zerotier-idtool initmoon identity.public >moon.j && cd /opt/ZeroTierOne/attic/world/ && ./mkworld \ && mkdir /app/bin -p && cp world.bin /app/bin/planet \ && service zerotier-one restart - + WORKDIR /app/ CMD /bin/sh -c "zerotier-one -d; cd /opt/ztncui/src;npm start"