GithubHelp home page GithubHelp logo

joyshmitz / docker-zerotier-moon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rwv/docker-zerotier-moon

0.0 1.0 0.0 70 KB

๐Ÿณ A docker image to create ZeroTier moon in one step.

License: GNU General Public License v3.0

Shell 91.18% Dockerfile 8.82%

docker-zerotier-moon's Introduction

docker-zerotier-moon

GitHub Actions Docker Version Docker Hub Docker Image Size
A docker image to create ZeroTier moon in one setp.

Have a look at dockerized ZeroTier: rwv/zerotier.

Table of Contents

Quickstart

Start a container

docker run --name zerotier-moon -d --restart always -p 9993:9993/udp -v ~/somewhere:/var/lib/zerotier-one seedgou/zerotier-moon -4 1.2.3.4

Replace 1.2.3.4 with your moon's IPv4 address and replace ~/somewhere with where you would like to store your configuration.

Show ZeroTier moon id

docker logs zerotier-moon

Docker Compose

Compose file

docker-compose.yml example:

version: "3"

services:
  zerotier-moon:
    image: seedgou/zerotier-moon
    container_name: "zerotier-moon"
    restart: always
    ports:
      - "9993:9993/udp"
    volumes:
      - ./config:/var/lib/zerotier-one
    entrypoint:
      - /startup.sh
      - "-4"
      - 1.2.3.4

Replace 1.2.3.4 with your moon's IPv4 address.

Show ZeroTier moon id

docker-compose logs

Advanced usage

Manage ZeroTier

docker exec zerotier-moon zerotier-cli

Mount ZeroTier conf folder

docker run --name zerotier-moon -d -p 9993:9993/udp -v ~/somewhere:/var/lib/zerotier-one seedgou/zerotier-moon -4 1.2.3.4 

When creating a new container without mounting ZeroTier conf folder, a new moon id will be generated. This command will mount ~/somewhere to /var/lib/zerotier-one inside the container, allowing your ZeroTier moon to presist the same moon id. If you don't do this, when you start a new container, a new moon id will be generated.

IPv6 support

docker run --name zerotier-moon -d -p 9993:9993/udp seedgou/zerotier-moon -4 1.2.3.4 -6 2001:abcd:abcd::1

Replace 1.2.3.4, 2001:abcd:abcd::1 with your moon's IP. You can remove -4 option in pure IPv6 environment.

Custom port

docker run --name zerotier-moon -d -p 9994:9993/udp seedgou/zerotier-moon -4 1.2.3.4 -p 9994

Replace 9994 with your own custom port for ZeroTier moon.

Network privilege

If you encounter issue: ERROR: unable to configure virtual network port: could not open TUN/TAP device: No such file or directory, please add --cap-add=NET_ADMIN --cap-add=SYS_ADMIN --device=/dev/net/tun args. Similar to this:

docker run --cap-add=NET_ADMIN --cap-add=SYS_ADMIN --device=/dev/net/tun --name zerotier-moon -d --restart always -p 9993:9993/udp seedgou/zerotier-moon -4 1.2.3.4

Solution provided by Jonnyan404's Fork. See Also Issue #1.

Multi-arch support

This image supports linux/386, linux/amd64, linux/ppc64le, linux/arm64, linux/arm/v7, linux/arm/v6, linux/s390x and linux/riscv64.

GitHub Container Registry

This image is also published on GitHub Container Registry: ghcr.io/rwv/zerotier-moon

docker-zerotier-moon's People

Contributors

biodrone avatar rwv avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.