mirror of
https://github.com/thelittlerocket/docker-zerotier.git
synced 2024-09-20 06:46:02 +08:00
first ver
This commit is contained in:
commit
56019513f6
9
Dockerfile
Normal file
9
Dockerfile
Normal file
|
@ -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
|
||||
|
||||
|
33
README.md
Normal file
33
README.md
Normal file
|
@ -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
|
||||
```
|
||||
|
3
files/start.sh
Normal file
3
files/start.sh
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
zerotier-one
|
Loading…
Reference in a new issue