1 Commits

Author SHA1 Message Date
fanyang89
46ba73600d docs(installation): refresh Docker Compose example
Update the Watchtower image reference and align the bilingual compose
example with the current setup guidance.
2026-03-28 11:39:11 +08:00
2 changed files with 70 additions and 60 deletions

View File

@@ -41,36 +41,41 @@ This section only introduces installation methods.
::: details docker-compose.yml ::: details docker-compose.yml
```yaml [docker-compose.yml] ```yaml [docker-compose.yml]
services: services:
watchtower: # Used to automatically update easytier image, delete this part if not needed # watchtower automatically updates the EasyTier image; remove this section if not needed
image: containrrr/watchtower watchtower:
container_name: watchtower image: nickfedor/watchtower
restart: unless-stopped container_name: watchtower
environment: restart: unless-stopped
- TZ=Asia/Shanghai environment:
- WATCHTOWER_NO_STARTUP_MESSAGE - TZ=Asia/Shanghai
volumes: - WATCHTOWER_NO_STARTUP_MESSAGE
- /var/run/docker.sock:/var/run/docker.sock volumes:
command: --interval 3600 --cleanup --label-enable - /var/run/docker.sock:/var/run/docker.sock
easytier: command: --interval 3600 --cleanup --label-enable
image: easytier/easytier:latest # Domestic users can use m.daocloud.io/docker.io/easytier/easytier:latest
hostname: easytier easytier:
container_name: easytier # Users in mainland China can use the DaoCloud mirror
labels: # image: m.daocloud.io/docker.io/easytier/easytier:latest
com.centurylinklabs.watchtower.enable: 'true' image: easytier/easytier:latest
restart: unless-stopped hostname: easytier
network_mode: host container_name: easytier
cap_add: labels:
- NET_ADMIN com.centurylinklabs.watchtower.enable: 'true'
- NET_RAW restart: unless-stopped
environment: network_mode: host
- TZ=Asia/Shanghai cap_add:
devices: - NET_ADMIN
- /dev/net/tun:/dev/net/tun - NET_RAW
volumes: environment:
- /etc/easytier:/root - TZ=Asia/Shanghai
- /etc/machine-id:/etc/machine-id:ro # Map host machine code devices:
command: -d --network-name <user> --network-secret <password> -p tcp://<your-public-ip>:11010 - /dev/net/tun:/dev/net/tun
volumes:
- /etc/machine-id:/etc/machine-id:ro
command: >
-d --network-name <user> --network-secret <password>
-p tcp://<public-ip-of-other-peer-or-public-node>:11010
``` ```
::: :::

View File

@@ -41,36 +41,41 @@
::: details docker-compose.yml ::: details docker-compose.yml
```yaml [docker-compose.yml] ```yaml [docker-compose.yml]
services: services:
watchtower: # 用于自动更新easytier镜像若不需要请删除这部分 # watchtower 用于自动更新 EasyTier 镜像,若不需要可以删除此节
image: containrrr/watchtower watchtower:
container_name: watchtower image: nickfedor/watchtower
restart: unless-stopped container_name: watchtower
environment: restart: unless-stopped
- TZ=Asia/Shanghai environment:
- WATCHTOWER_NO_STARTUP_MESSAGE - TZ=Asia/Shanghai
volumes: - WATCHTOWER_NO_STARTUP_MESSAGE
- /var/run/docker.sock:/var/run/docker.sock volumes:
command: --interval 3600 --cleanup --label-enable - /var/run/docker.sock:/var/run/docker.sock
easytier: command: --interval 3600 --cleanup --label-enable
image: easytier/easytier:latest # 国内用户可以使用 m.daocloud.io/docker.io/easytier/easytier:latest
hostname: easytier easytier:
container_name: easytier # 国内用户可以使用 daocloud.io 镜像
labels: # image: m.daocloud.io/docker.io/easytier/easytier:latest
com.centurylinklabs.watchtower.enable: 'true' image: easytier/easytier:latest
restart: unless-stopped hostname: easytier
network_mode: host container_name: easytier
cap_add: labels:
- NET_ADMIN com.centurylinklabs.watchtower.enable: 'true'
- NET_RAW restart: unless-stopped
environment: network_mode: host
- TZ=Asia/Shanghai cap_add:
devices: - NET_ADMIN
- /dev/net/tun:/dev/net/tun - NET_RAW
volumes: environment:
- /etc/easytier:/root - TZ=Asia/Shanghai
- /etc/machine-id:/etc/machine-id:ro # 映射宿主机机器码 devices:
command: -d --network-name <用户> --network-secret <密码> -p tcp://<您的公网IP>:11010 - /dev/net/tun:/dev/net/tun
volumes:
- /etc/machine-id:/etc/machine-id:ro
command: >
-d --network-name <用户> --network-secret <密码>
-p tcp://<其他对等节点 / 公共节点的公网 IP>:11010
``` ```
::: :::