Skip to content

Commit

Permalink
init test
Browse files Browse the repository at this point in the history
  • Loading branch information
Aoang committed Mar 14, 2024
0 parents commit 26f66cf
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Build
on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: docker build .
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
46 changes: 46 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
FROM debian:bookworm-slim as builder

ENV VERSION=v1.12.2

WORKDIR /app

RUN apt-get update -y && apt-get install -y add --no-cache git python3 npm make linux-headers curl pkgconfig openssl-dev jq build-base clang

RUN set -x\
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y\
&& source "$HOME/.cargo/env"\
&& git clone --quiet --depth 1 -b $VERSION https://github.com/zerotier/ZeroTierOne.git\
&& cd ZeroTierOne && make ZT_SYMLINK=1 && make && make install

#make ztncui
RUN set -x \
&& mkdir /app -p \
&& cd /app \
&& git clone --progress https://github.com/key-networks/ztncui.git\
&& cd /app/ztncui/src \
&& npm install -g node-gyp\
&& npm install

FROM debian:bookworm-slim

WORKDIR /app


ENV IP_ADDR4=''
ENV IP_ADDR6=''

ENV ZT_PORT=9994
ENV API_PORT=3443
ENV FILE_SERVER_PORT=3000

ENV FILE_KEY=''

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

ADD https://github.com/kaaass/ZeroTierOne/releases/download/mkmoonworld-1.0/mkmoonworld-x86_64 /app/mkmoonworld-x86_64

VOLUME [ "/app/dist","/app/ztncui","/var/lib/zerotier-one","/app/config"]

CMD ["/bin/sh","--"]

0 comments on commit 26f66cf

Please sign in to comment.