所以这是我的docker-compose文件

version: '3'

networks:
  traefik-net:
    driver: bridge

services:
  # The reverse proxy service (Træfik)
  reverse-proxy:
    image: traefik  # The official Traefik docker image
    ports:
      - "80:80"      # The HTTP port
      - "8082:8082"  # The Web UI (enabled by --api)
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./traefik.toml:/etc/traefik/traefik.toml
    labels:
      - "traefik.docker.network=traefik-net"
    networks:
     - traefik-net

  auth:
    image: auth
    labels:
      - "traefik.enable=true"
      - "traefik.backend=auth"
      - "traefik.frontend.rule=Host:auth.localhost"
      - "traefik.docker.network=traefik-net"
    networks:
     - traefik-net

  clients:
    image: clients
    labels:
      - "traefik.enable=true"
      - "traefik.backend=clients"
      - "traefik.frontend.rule=Host:clients.localhost"
      - "traefik.docker.network=traefik-net"
    networks:
     - traefik-net

这是我的 traefik.toml 文件

defaultEntryPoints = ["http"]

[api]

[docker]
  endpoint = "unix:///var/run/docker.sock"
  domain = "traefik.localhost"
  watch = true

[entryPoints]
  [entryPoints.traefik]
  address = ":8082"

  [entryPoints.http]
  address = ":80"

我想要做的是从 auth containerclients container 发出请求在auth容器内执行此命令

wget -qO- --header =“Host:clients.localhost”http:// localhost /

我得到这个输出

wget:无法连接到远程主机(127.0.0.1):连接被拒绝

在集装箱外面,指挥官工作得很好 . 我该怎么做才能使用traefik从一个容器向另一个容器发出请求

谢谢您的帮助 :)