forked from extern/zerotier-docker
first commit
This commit is contained in:
commit
f880c72c7d
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
dist
|
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
FROM alpine:3.5
|
||||
|
||||
LABEL maintainer "Lukas Prettenthaler <lukas@noenv.com>"
|
||||
LABEL version "1.2.2"
|
||||
LABEL description "Containerized ZeroTier One for use on CoreOS or other Docker-only Linux hosts."
|
||||
|
||||
RUN apk add --no-cache --update libgcc libstdc++
|
||||
|
||||
COPY dist/usr/sbin/zerotier-one /zerotier-one
|
||||
|
||||
RUN chmod 0755 /zerotier-one && ln -sf /zerotier-one /zerotier-cli && ln -sf /zerotier-one /zerotier-idtool && mkdir -p /var/lib/zerotier-one
|
||||
|
||||
COPY main.sh /main.sh
|
||||
|
||||
RUN chmod 0755 /main.sh
|
||||
|
||||
ENTRYPOINT ["/bin/sh", "-c", "/main.sh"]
|
9
alpine.sh
Normal file
9
alpine.sh
Normal file
@ -0,0 +1,9 @@
|
||||
apk add --update alpine-sdk linux-headers
|
||||
cd build
|
||||
rm -rf dist/*
|
||||
curl -s https://codeload.github.com/zerotier/ZeroTierOne/zip/1.2.2 -o zerotier-src.zip
|
||||
unzip -q zerotier-src.zip
|
||||
cd ./ZeroTierOne-1.2.2
|
||||
make -f make-linux.mk
|
||||
DESTDIR=/build/dist make -f make-linux.mk install
|
||||
|
2
build.sh
Executable file
2
build.sh
Executable file
@ -0,0 +1,2 @@
|
||||
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
Normal file
11
main.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/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
|
||||
|
2
release.sh
Executable file
2
release.sh
Executable file
@ -0,0 +1,2 @@
|
||||
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