我正在尝试将 traefik 与 docker compose 一起使用。
根据我在他们网站上看到的线程,你可以使用这样的东西:
mytest-steph:
image: myimage
ports:
- "45001:45001"
labels:
- "traefik.backend=test_steph"
- "traefik.frontend.rule=Host:test.mydomain.com;PathPrefix:/myprefix"
- "traefik.backend.port=8080"
- "traefik.frontend.auth.basic=test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/"
但是当我启动 docker-compose up 时,我得到:
WARNING: The apr1 variable is not set. Defaulting to a blank string.
WARNING: The H6uskkkW variable is not set. Defaulting to a blank string.
WARNING: The IgXLP6ewTrSuBkTrqE8wj variable is not set. Defaulting to a blank string.
有没有人实现使用这样的基本身份验证?