docker - 404 错误:无法使用 Docker 访问 Traefik 仪表板
问题描述
我无法访问 Traefik 仪表板。我尝试使用 localhost 和给定的 Docker IP 地址 192.168.99:3000 只是它导致 404 错误页面。我所有的其他服务都在工作。
码头工人-compose.yml
version: "3.3"
networks:
# Allow the use of traefik in other docker-compose.yml files
traefik:
external: true
services:
traefik:
image: "traefik:v2.2"
container_name: "traefik"
logging:
options:
max-size: "10m"
max-file: "3"
command:
# Only for development environment
- "--log.level=DEBUG"
- "--api.insecure=true"
# Get Docker as the provider
- "--providers.docker=true"
# Avoid that all containers are exposed
- "--providers.docker.exposedbydefault=false"
# Settle the ports for the entry points
- "--entrypoints.web.address=:3000"
# Settle the autentification method to http challenge
- "--certificatesresolvers.myhttpchallenge.acme.httpchallenge=true"
- "--certificatesresolvers.myhttpchallenge.acme.httpchallenge.entrypoint=web"
# Uncomment this to get a fake certificate when testing
#- "--certificatesresolvers.myhttpchallenge.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
# Settle letsencrypt as the certificate provider
- "--certificatesresolvers.myhttpchallenge.acme.email=me@mail.com"
- "--certificatesresolvers.myhttpchallenge.acme.storage=/letsencrypt/acme.json"
ports:
- "3000:3000"
networks:
- "traefik"
labels:
traefik.frontend.rule: 'Host:web.localhost'
volumes:
# Store certificates in ./letsencrypt/acme.json
- "./letsencrypt:/letsencrypt"
# Connect to Doker socket
- "/var/run/docker.sock:/var/run/docker.sock:ro"
当我运行 docker-compose up -d 时,Traefik 加载正常,但我无法访问仪表板。有人请帮我指出正确的方向。谢谢。
解决方案
推荐阅读
- f# - 指定泛型返回类型的 F# 接口
- flutter - 在颤振中,如何在用户第一次访问该网站时创建一个 cookie,并检查该 cookie 是否存在于所有后续访问中?
- r - R 格式表中的不均匀对齐与 kableExtra 相结合
- python - 如何打乱python列表以保留某些元素的出现?
- mysql - 在mysql中生成数素数
- ios - iOS HealthKit 项目使用 HKActivitySummaryQuery - 总结总是无
- swift - 如何从视图中关闭 nspopover?
- swift - 使用 Xcode 和 Swift 将嵌套字典保存到 UserDefaults
- reactjs - 如何在发送 Content-Type multipart/form-data 的同时将图像/jpeg 文件上传到 s3 上的预签名 url?
- r - 如何比较分类时间序列的三个模型的预测准确性?