diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-07-26 17:08:09 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-07-26 17:08:09 -0700 |
commit | 1e6e112806903009643aef0a2f3736821c1a54d2 (patch) | |
tree | 1e07f674e119b9a12405352be07ee90831f574a2 | |
parent | 13100b245c506c52e09a28d8847d18965b2d4745 (diff) | |
download | infinitytier-1e6e112806903009643aef0a2f3736821c1a54d2.tar.gz infinitytier-1e6e112806903009643aef0a2f3736821c1a54d2.zip |
Dockerfile for building zerotier/zerotier-containerized for CoreOS et al.
-rw-r--r-- | linux-build-farm/other/zerotier-containerized/Dockerfile | 20 | ||||
-rwxr-xr-x | linux-build-farm/other/zerotier-containerized/main.sh | 10 |
2 files changed, 30 insertions, 0 deletions
diff --git a/linux-build-farm/other/zerotier-containerized/Dockerfile b/linux-build-farm/other/zerotier-containerized/Dockerfile new file mode 100644 index 00000000..678216da --- /dev/null +++ b/linux-build-farm/other/zerotier-containerized/Dockerfile @@ -0,0 +1,20 @@ +FROM alpine:latest +MAINTAINER Adam Ierymenko <adam.ierymenko@zerotier.com> + +LABEL version="1.1.14" +LABEL description="Containerized ZeroTier One for use on CoreOS or other Docker-only Linux hosts." + +# Uncomment to build in container +#RUN apk add --update alpine-sdk linux-headers + +RUN apk add --update libgcc libstdc++ + +ADD zerotier-one / +RUN chmod 0755 /zerotier-one +RUN ln -sf /zerotier-one /zerotier-cli +RUN mkdir -p /var/lib/zerotier-one + +ADD main.sh / +RUN chmod 0755 /main.sh + +ENTRYPOINT /main.sh diff --git a/linux-build-farm/other/zerotier-containerized/main.sh b/linux-build-farm/other/zerotier-containerized/main.sh new file mode 100755 index 00000000..685a6891 --- /dev/null +++ b/linux-build-farm/other/zerotier-containerized/main.sh @@ -0,0 +1,10 @@ +#!/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 |