MENU

通过docker compose一键部署easytier组网

August 1, 2024 • 服务器

1.创建docker-compose.yml

version: "3.8"
services:
   watchtower: #用于自动更新easytier镜像,若不需要请删除这部分
         command: --interval 3600 --cleanup --label-enable
         container_name: watchtower
         environment:
               - TZ=Asia/Shanghai
               - WATCHTOWER_NO_STARTUP_MESSAGE
         image: containrrr/watchtower
         restart: always
         volumes:
               - /var/run/docker.sock:/var/run/docker.sock
   easytier:
         restart: always
         labels:
               com.centurylinklabs.watchtower.enable: "true"        
         privileged: true
         mem_limit: 0m
         container_name: easytier
         hostname: easytier
         network_mode: host
         volumes:
               - /etc/easytier:/root
         environment:
               - TZ=Asia/Shanghai
         image: easytier/easytier:latest
         command: -i <ip> --network-name <用户> --network-secret <密码> -e tcp://<服务器地址>:11010 -l <监听地址>

2.启动

docker-compose up -d
Archives QR Code
QR Code for this page
Tipping QR Code