Can be used as a starting base for other images to include Zerotier functionality.
This repository contains the necessary files to build and run a ZeroTier One image using both Podman and Docker. The setup includes a Containerfile and a podman-compose.yml file (rename to Dockerfile
&docker-compose.yml
if using Docker and Docker-Compose.
- Clone the Repository: Fetch the files from GitHub.
- Build the Image: Create the Docker/Podman image.
- Configuration: Adjust settings for your environment.
- Running the Container: Start your ZeroTier container.
Ensure you have the following installed on your system:
- Docker or Podman
- docker-compose or podman-compose respecfully
- curl
- git (for cloning this repository)
From in your target directory, clone the repository from GitHub and optionally set your own folder name:
git clone https://github.com/jwalk9000/turbonet-zerotier.git [your-folder-name]
cd [your-folder-name]
Navigate to the directory containing the build file: Containerfile for podman, rename to Dockerfile for Docker:
cd /path/to/Buildfile
Build the Docker image:
docker build -t myzerotierimage .
Build the Podman image:
podman build -t myzerotierimage .
Change myzerotierimage
to any name you choose, remember to change the image name in the compose.yml to match.
Set your ZeroTier Network ID in the compose.yml file:
environment:
- ZEROTIER_NETWORK_ID=<YOUR_NETWORK_ID>
Replace <YOUR_NETWORK_ID>
with your actual ZeroTier Network ID.
Set the local machine director in the compose.yml file:
volumes:
- /home/podman/zerotier/data:/var/lib/zerotier-one
Replace /home/podman/zerotier/
with where you want persistant data to be saved.
Run the Podman container with podman-compose:
podman-compose up -d
Run the Docker container with docker-compose:
docker-compose up -d
- The Containerfile installs the necessary packages, and sets up ZeroTier One.
- The podman-compose.yml file maps the necessary devices and ports, ensures the container joins your specified ZeroTier network, and that your configuration data is persisted.
If you encounter any issues:
- Check the container logs:
docker logs myzerotiercontainer
or
podman logs myzerotiercontainer
- Ensure that your network configurations allow ZeroTier traffic.
Feel free to submit pull requests or report issues to improve this setup.
This project is licensed under the MIT License.