1
0
key-networks 4 жил өмнө
parent
commit
1b5a2c3bae
5 өөрчлөгдсөн 55 нэмэгдсэн , 11 устгасан
  1. 7 1
      Dockerfile
  2. 18 5
      README.md
  3. 1 0
      VERSION
  4. 3 5
      denv
  5. 26 0
      release.sh

+ 7 - 1
Dockerfile

@@ -2,7 +2,9 @@ FROM debian:sid-slim AS builder
 ENV NODEJS_MAJOR=14
 
 ARG DEBIAN_FRONTEND=noninteractive
-LABEL MAINTAINER="kmahyyg <spam@kmahyyg.xyz>"
+LABEL MAINTAINER="Key Networks https://key-networks.com"
+LABEL Description="ztncui (a ZeroTier network controller user interface) + ZeroTier network controller"
+ADD VERSION .
 
 # BUILD ZTNCUI IN FIRST STAGE
 WORKDIR /build
@@ -47,6 +49,8 @@ RUN mkdir -p binaries && \
 FROM debian:sid-slim AS runner
 RUN apt update -y && \
     apt install curl gnupg2 ca-certificates unzip supervisor net-tools procps --no-install-recommends -y && \
+    groupadd -g 2222 zerotier-one && \
+    useradd -u 2222 -g 2222 zerotier-one && \
     curl -sL -o ztone.sh https://install.zerotier.com && \
     bash ztone.sh && \
     rm -f ztone.sh && \
@@ -77,6 +81,8 @@ RUN chmod 4755 /bin/gosu && \
 EXPOSE 3000/tcp
 EXPOSE 9993/udp
 EXPOSE 3180/tcp
+EXPOSE 8000/tcp
+EXPOSE 3443/tcp
 
 WORKDIR /
 VOLUME ["/opt/key-networks/ztncui/etc"]

+ 18 - 5
README.md

@@ -1,16 +1,29 @@
 # ztncui-aio
+## ZeroTier network controller user interface in a Docker container
+
+This is to build a Docker image that contains **[ZeroTier One](https://www.zerotier.com/download.shtml)** and **[ztncui](https://key-networks.com/ztncui)** to set up a **standalone ZeroTier network controller** with a web user interface in a container.
+
+Follow us on [![alt @key_networks on Twitter](https://i.imgur.com/wWzX9uB.png)](https://twitter.com/key_networks)
+
+Licensed Under GNU GPLv3
+
+## Credit
+Thanks to @kmahyyg for https://github.com/kmahyyg/ztncui-aio from which this build process is forked.
+
+## Further information
+Refer to https://github.com/key-networks/ztncui-containerized for the original documentation.
 
-Licensed Under AGPL v3
 ## Usage
 
 ```bash
-$ git clone https://github.com/kmahyyg/ztncui-aio # if you wanna use env file, you need to clone, else not.
-$ docker pull kmahyyg/ztncui-aio
-$ docker run -d -p3000:3000 -p9993:9993 -p3180:3180 \
+$ git clone https://github.com/key-networks/ztncui-aio # to get a copy of denv file, otherwise make your own
+$ docker pull keynetworks/ztncui
+$ docker run -d -p3443:3443 -p9993:9993 -p3180:3180 \
     -v /mydata/ztncui:/opt/key-networks/ztncui/etc \
     -v /mydata/zt1:/var/lib/zerotier-one \
     --env-file ./denv <CHANGE HERE ACCORDING TO NEXT PART> \
-    kmahyyg/ztncui-aio
+    --name ztncui \
+    keynetworks/ztncui
 ```
 
 ## Supported Configuration via persistent storage

+ 1 - 0
VERSION

@@ -0,0 +1 @@
+1.2.6

+ 3 - 5
denv

@@ -1,5 +1,3 @@
-HTTP_ALL_INTERFACES=yes
-HTTP_PORT=3000
-MYADDR=1.2.3.4
-ZTNCUI_PASSWD=Th1sPa55W0rd
-MYDOMAIN=ztncui.docker.test
+HTTPS_PORT=3443
+ZTNCUI_PASSWD=password
+MYDOMAIN=ztncui.docker.test

+ 26 - 0
release.sh

@@ -0,0 +1,26 @@
+#!/bin/bash
+# Derived from https://medium.com/travis-on-docker/how-to-version-your-docker-images-1d5c577ebf54
+
+set -ex
+
+USERNAME=keynetworks
+IMAGE=ztncui
+
+# bump version
+docker run --rm -v "$PWD":/app treeder/bump patch
+version=`cat VERSION`
+echo "version: $version"
+
+# build
+docker build -t $USERNAME/$IMAGE:latest .
+
+# tag it
+git add -A
+git commit -m "version $version"
+git tag -a "$version" -m "version $version"
+docker tag $USERNAME/$IMAGE:latest $USERNAME/$IMAGE:$version
+
+# push it
+docker login --username=$USERNAME
+docker push $USERNAME/$IMAGE:latest
+docker push $USERNAME/$IMAGE:$version