mirror of
https://github.com/zyclonite/zerotier-docker.git
synced 2024-12-04 13:33:14 +01:00
move repo from znx to here
This commit is contained in:
parent
78462edad0
commit
a48626c110
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +0,0 @@
|
||||
dist
|
29
Dockerfile
29
Dockerfile
@ -1,17 +1,24 @@
|
||||
FROM alpine:3.5
|
||||
FROM debian:buster-slim
|
||||
|
||||
LABEL maintainer "Lukas Prettenthaler <lukas@noenv.com>"
|
||||
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"]
|
||||
|
21
LICENSE
Normal file
21
LICENSE
Normal 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.
|
@ -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
|
||||
|
2
build.sh
2
build.sh
@ -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
11
main.sh
@ -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
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user