move repo from znx to here

This commit is contained in:
Lukas Prettenthaler 2019-10-17 16:11:51 +02:00
parent 78462edad0
commit a48626c110
No known key found for this signature in database
GPG Key ID: 58E5A82932BCE65D
7 changed files with 39 additions and 36 deletions

1
.gitignore vendored
View File

@ -1 +0,0 @@
dist

View File

@ -1,17 +1,24 @@
FROM alpine:3.5 FROM debian:buster-slim
LABEL maintainer "Lukas Prettenthaler <lukas@noenv.com>" # zerotier-one version
LABEL version "1.2.4" ARG ZT_VERSION=1.4.6
LABEL description "Containerized ZeroTier One for use on CoreOS or other Docker-only Linux hosts."
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 ["zerotier-one"]
ENTRYPOINT ["/bin/sh", "-c", "/main.sh"]

21
LICENSE Normal file
View File

@ -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.

View File

@ -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

View File

@ -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 .

11
main.sh
View File

@ -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

View File

@ -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