Adam Ierymenko a95fa379cc Circuit tests basically work but need some tweaks, and fix some issues found with valgrind. 9 yıl önce
..
Dockerfile 97dee9de36 Add more helpful example stuff. 9 yıl önce
README.md 9a25651151 . 9 yıl önce
main.sh a95fa379cc Circuit tests basically work but need some tweaks, and fix some issues found with valgrind. 9 yıl önce
maketestenv.sh e33adad8f5 Script to quickly generate test docker env files. 9 yıl önce

README.md

Simple Dockerfile Example

This is a simple Docker example using ZeroTier One in normal tun/tap mode. It uses a Dockerfile to build an image containing ZeroTier One and a main.sh that launches it with an identity supplied via the Docker environment via the ZEROTIER_IDENTITY_SECRET and ZEROTIER_NETWORK variables. The Dockerfile assumes that the zerotier-one binary is in the build folder.

This is not a very secure way to load an identity secret, but it's useful for testing since it allows you to repeatedly launch Docker containers with the same identity. For production we'd recommend using something like Hashicorp Vault, or modifying main.sh to leave identities unspecified and allow the container to generate a new identity at runtime. Then you could script approval of containers using the controller API, approving them as they launch, etc. (We are working on better ways of doing mass provisioning.)

To use in normal tun/tap mode with Docker, containers must be run with the options "--device=/dev/net/tun --privileged". The main.sh script supplied here will complain and exit if these options are not present (no /dev/net/tun device).