Traefik-v2.x快速入门
Traefik v2.0 快速入门 traefik官方文档 注意:Traefikv2.0之后的版本在修改了很多bug之后也增加了新的特性,比如增加了TCP的支持,并且更换了新的WEB UI界面 使用 docker-compose 来快速启动traefki实例. # 查看编辑好的docker-compose配置文件 $ cat traefik-v2.0.yaml version: '3' services: reverse-proxy: image: traefik:2.0.1 # Enables the web UI and tells Traefik to listen to docker # 启用webUI 并告诉Traefile去监听docker的容器实例 command: --api.insecure=true --providers.docker ports: # traefik暴露的http端口 - "80:80" # webUI暴露的端口(必须制定--api.insecure=true才可以访问) - "8080:8080" volumes: # 指定docker的sock文件来让traefik获取docker的事件,从而实现动态负载均衡 - /var/run/docker.sock:/var/run/docker.sock # 使用docker