From 1b5a2c3bae230a6382f92a2ea1dcb76470af0cd0 Mon Sep 17 00:00:00 2001 From: key-networks <34238649+key-networks@users.noreply.github.com> Date: Sat, 23 Jan 2021 19:29:47 +0800 Subject: [PATCH] version 1.2.6 (#1) --- Dockerfile | 8 +++++++- README.md | 23 ++++++++++++++++++----- VERSION | 1 + denv | 8 +++----- release.sh | 26 ++++++++++++++++++++++++++ 5 files changed, 55 insertions(+), 11 deletions(-) create mode 100644 VERSION create mode 100755 release.sh diff --git a/Dockerfile b/Dockerfile index 41f4f34..7d99ed5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,9 @@ FROM debian:sid-slim AS builder ENV NODEJS_MAJOR=14 ARG DEBIAN_FRONTEND=noninteractive -LABEL MAINTAINER="kmahyyg " +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"] diff --git a/README.md b/README.md index 7ac2692..bb80195 100644 --- a/README.md +++ b/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 \ - kmahyyg/ztncui-aio + --name ztncui \ + keynetworks/ztncui ``` ## Supported Configuration via persistent storage diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..3c43790 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +1.2.6 diff --git a/denv b/denv index df6c98f..14c03d6 100644 --- a/denv +++ b/denv @@ -1,5 +1,3 @@ -HTTP_ALL_INTERFACES=yes -HTTP_PORT=3000 -MYADDR=1.2.3.4 -ZTNCUI_PASSWD=Th1sPa55W0rd -MYDOMAIN=ztncui.docker.test \ No newline at end of file +HTTPS_PORT=3443 +ZTNCUI_PASSWD=password +MYDOMAIN=ztncui.docker.test diff --git a/release.sh b/release.sh new file mode 100755 index 0000000..7765e2a --- /dev/null +++ b/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