【发布时间】:2018-11-03 07:42:29
【问题描述】:
是否可以从 CLI 覆盖文件提供程序的后端 URL?
例如:
docker rm -f traefik-cockpit; docker run -d -p 443:443 \
-v /var/run/docker.sock:/var/run/docker.sock \
--label 'traefik.enable=true' \
--label 'traefik.file.backend.url=127.0.0.1' \
--label 'traefik.docker.network=host' \
--label 'traefik.frontend.rule=Host:cockpit.myexample.com' \
--label 'traefik.port=9090' \
--label 'traefik.protocol=http' \
--name traefik-cockpit \
traefik:v1.6.6-alpine \
--file \
--defaultentrypoints="https" \
--entryPoints='Name:https Address::443 TLS' \
--docker.endpoint=unix:///var/run/docker.sock \
--docker.exposedbydefault=false \
--docker.watch=true
有很多应用程序直接在主机上运行,这将从 CLI 启用文件提供程序的自动配置
可能的解决方案:
--label 'traefik.file.backend.url=127.0.0.1' \
--label 'traefik.docker.network=host' \
或
--label 'traefik.file.backend.url=192.168.0.5' \
谢谢
【问题讨论】:
标签: traefik