diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 1521c8b..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -dist diff --git a/Dockerfile b/Dockerfile index f56ebc7..3983a8c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,24 @@ -FROM alpine:3.5 +FROM debian:buster-slim -LABEL maintainer "Lukas Prettenthaler " -LABEL version "1.2.4" -LABEL description "Containerized ZeroTier One for use on CoreOS or other Docker-only Linux hosts." +# zerotier-one version +ARG ZT_VERSION=1.4.6 -RUN apk add --no-cache --update libgcc libstdc++ +LABEL maintainer="Lukas Prettenthaler (zyclonite)" +LABEL version="$ZT_VERSION" +LABEL description="Containerized ZeroTier One for use on CoreOS or other Docker-only Linux hosts." -COPY dist/usr/sbin/zerotier-one /zerotier-one +# Configure environment +ENV ZT_VERSION=${ZT_VERSION} -RUN chmod 0755 /zerotier-one && ln -sf /zerotier-one /zerotier-cli && ln -sf /zerotier-one /zerotier-idtool && mkdir -p /var/lib/zerotier-one +RUN apt-get update \ + && apt-get install -y gnupg2 \ + && apt-key adv --fetch-keys http://download.zerotier.com/contact%40zerotier.com.gpg \ + && echo "deb http://download.zerotier.com/debian/buster buster main" > /etc/apt/sources.list.d/zerotier.list \ + && apt-get update \ + && apt-get install -y zerotier-one=${ZT_VERSION} \ + && rm -rf /var/lib/apt/lists/* -COPY main.sh /main.sh +VOLUME /var/lib/zerotier-one +EXPOSE 9993 -RUN chmod 0755 /main.sh - -ENTRYPOINT ["/bin/sh", "-c", "/main.sh"] +ENTRYPOINT ["zerotier-one"] diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b90c101 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Lukas Prettenthaler (zyclonite) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/alpine.sh b/alpine.sh deleted file mode 100644 index e0fc3da..0000000 --- a/alpine.sh +++ /dev/null @@ -1,9 +0,0 @@ -apk add --update alpine-sdk linux-headers -cd build -rm -rf dist/* -curl -s https://codeload.github.com/zerotier/ZeroTierOne/zip/1.2.4 -o zerotier-src.zip -unzip -q zerotier-src.zip -cd ./ZeroTierOne-1.2.4 -make -f make-linux.mk -DESTDIR=/build/dist make -f make-linux.mk install - diff --git a/build.sh b/build.sh deleted file mode 100755 index fe66373..0000000 --- a/build.sh +++ /dev/null @@ -1,2 +0,0 @@ -docker run --rm -v $(pwd)/dist:/build/dist -v $(pwd)/alpine.sh:/alpine.sh -it alpine:3.5 sh /alpine.sh -docker build -t zyclonite/zerotier . diff --git a/main.sh b/main.sh deleted file mode 100644 index 6e46bc0..0000000 --- a/main.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin - -if [ ! -e /dev/net/tun ]; then - echo 'FATAL: cannot start ZeroTier One in container: /dev/net/tun not present.' - exit 1 -fi - -exec /zerotier-one - diff --git a/release.sh b/release.sh deleted file mode 100755 index 65fb0c2..0000000 --- a/release.sh +++ /dev/null @@ -1,2 +0,0 @@ -docker tag zyclonite/zerotier:latest registry.hub.docker.com/zyclonite/zerotier:latest -docker push registry.hub.docker.com/zyclonite/zerotier:latest