commit 56019513f62ae0a2a845bf2836c04bb3cd782f48 Author: crocandr Date: Mon Jul 25 17:06:25 2016 +0200 first ver diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9b8e620 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM ubuntu:xenial + +RUN apt-get update && apt-get install -y curl +RUN curl -L -o /tmp/zerotier-install.sh https://install.zerotier.com/ && bash /tmp/zerotier-install.sh || exit 0 + +COPY files/start.sh /opt/start.sh +RUN chmod 755 /opt/start.sh + + diff --git a/README.md b/README.md new file mode 100644 index 0000000..5fda36e --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +# Zerotier + +## Build + +``` +docker build -t my/zerotier . +``` + +## Run + +You have to load `tun` module on docker host. + +``` +modprobe tun +``` + +... and you can start ZeroTier container with this command. + +``` +docker run -tid --name=zerotier --net=host --privileged my/zerotier /opt/start.sh +``` + +## Usage + +### Create and Connect to network + + 1. You have to register ZeroTier service on https://my.zerotier.com page. + 2. You have to create a network on the zerotier's page (You got a Network ID like: 565799d8f6bba354 ) + 3. You have to join with the ZeroTier node +``` +docker exec -ti zerotier zerotier-cli join 565799d8f6bba354 +``` + diff --git a/files/start.sh b/files/start.sh new file mode 100644 index 0000000..d9d597f --- /dev/null +++ b/files/start.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +zerotier-one