From 7ad182fba66f1d3794ef3feca2125eabdbdbfd13 Mon Sep 17 00:00:00 2001 From: Josh J Date: Wed, 18 Oct 2023 08:51:03 +0100 Subject: [PATCH] docs: update docs fixes: #22 --- README.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 947cfa2..a8a7bc3 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ A container to provide out-of-the-box bridging functionality to a ZeroTier netwo ### Prerequisites -- Docker running as your logged in user (i.e. not having to run `sudo docker-compose xyz`) - [Linux instructions here](https://docs.docker.com/engine/install/linux-postinstall/) +- Docker running as your logged in user (if `docker ps` runs then you're good, if not follow the link ->) - [Linux instructions here](https://docs.docker.com/engine/install/linux-postinstall/) ### ZeroTier UI Changes @@ -22,17 +22,15 @@ You also need to add a static route into ZeroTier so that the traffic is routed **You need to edit the `ZT_NETWORKS` and `ARCH` variable in the `docker-compose.yml` file first to add your networks and make sure your acrhitecture is correct (see [this page](http://download.zerotier.com/debian/buster/pool/main/z/zerotier-one/) for examples, usually either amd64 or arm64)** -Easy one-liner for Docker Compose: +Easiest way to bring up is via Docker Compose. Rename `docker-compose.yml.example` to `docker-compose.yml` and run `docker compose up -d`. -`docker-compose build && docker-compose up -d` - -If you want to disable bridging, set `ZT_BRIDGE=false`. This can be done after the initial networks have been joined (just rebuild the container), as the ZeroTier config persists but IPTables forwarding is done on each container startup. +If you want to disable bridging, set `ZT_BRIDGE=false`. This can be done after the initial networks have been joined (just change the environment variable in the `docker-compose.yml` file and run `), as the ZeroTier config persists but IPTables forwarding is done on each container startup. ### OG Docker `docker build -t zerotierbridge .` -`docker run --privileged -e ZT_NETWORKS=NETWORK_ID_HERE -e ZT_BRIDGE=true zerotierbridge:latest` +`docker run --privileged -e ZT_NETWORKS=NETWORK_1 NETWORK_2 -e ZT_BRIDGE=true zerotierbridge:latest` Add your network ID(s) into the `ZT_NETWORKS` argument, space separated. @@ -42,7 +40,7 @@ Disable bridging by passing `ZT_BRIDGE=false`. This can be done after the initia If you would like the container to retain the same ZeroTier client ID on reboot, attach a volume as per the below. -`docker run --privileged -e ZT_NETWORKS=NETWORK_ID_HERE ZT_BRIDGE=true --volume zt_config:/var/lib/zerotier-one/ zerotierbridge:latest` +`docker run --privileged -e ZT_NETWORKS=NETWORK_ID_HERE ZT_BRIDGE=true -v zt_config:/var/lib/zerotier-one/ zerotierbridge:latest` #### Caveat: Architecture