UbuntuZero is a Ubuntu base image for Docker with built in support for ZeroTier via the ZeroTierSDK. It is meant to be used as a base image. Take a look at node-zero or app-node-zero as examples.
This image provides a script called init-zerotier
. If you want to enable ZeroTier
for your app, you need an init script
similar to this:
#!/bin/sh
init-zerotier || exit 1
export ZT_NC_NETWORK=/var/lib/zerotier-one/nc_$ZEROTIER_NETWORK_ID
export LD_PRELOAD=/libztintercept.so
redis-server // <- start your app
You also need to pass a ZEROTIER_NETWORK_ID
and a ZEROTIER_API_TOKEN
environment variables when starting the container. Take a look at the app-node-zero as an example.
enjoy.