Traefik无法添加容器

时间:2019-08-08 08:50:51

标签: docker-compose traefik

我正在Docker上运行traefik,其配置位于docker-compose标签中。

除一个容器外,所有我的容器都已成功添加到Traefik。有问题的容器具有与其他容器相同的配置,并且只能运行一次,只是简短地解释了原因。

在traefik上运行调试日志级别时,它显示为容器未通过运行状况检查,但是可以从主机的暴露端口访问它。

  transmission:
      container_name: transmission
      image: haugene/transmission-openvpn
      cap_add:
        - NET_ADMIN
      devices:
        - /dev/net/tun
      restart: always
      dns:
        - 8.8.8.8
        - 8.8.4.4
      volumes:
        - /etc/localtime:/etc/localtime:ro
        - /mnt/media/@data/transmission/downloads:/data
        - /mnt/media/@data/transmission/config:/etc/openvpn/custom/
      environment:
        - OPENVPN_PROVIDER=CUSTOM
        - OPENVPN_USERNAME=
        - OPENVPN_PASSWORD=
        - OPENVPN_OPTS=--inactive 3600 --ping 10 --ping-exit 60
        - LOCAL_NETWORK=192.168.1.0/24
        - PUID=1000
        - PGID=1000
        - TZ=Australia/Sydney
      networks:
          - traefik
      expose:
          - 9091
      labels:
        - "traefik.enable=true"
        - "traefik.backend=transmission"
        - "traefik.frontend.rule=Host:transmission.domain.com"
        - "traefik.port=9091"
        - "traefik.docker.network=traefik" 

并从日志中获取:

time="2019-08-08T08:12:50Z" level=debug msg="allLabelsmap[:map[traefik.frontend.rule:Host:traefik.alexturner.co traefik.port:8080 traefik.backend:traefik traefik.docker.network:traefik]]"
time="2019-08-08T08:12:50Z" level=debug msg="originLabelsmap[traefik.docker.network:traefik traefik.port:9091 com.docker.compose.config-hash:2c785df6f289f5650546dcd905b0e3f50ed20e8556a066ffb8e118d884dc249b com.docker.compose.container-number:1 com.docker.compose.service:torrent com.docker.compose.version:1.17.1 com.docker.compose.oneoff:False com.docker.compose.project:docker traefik.backend:torrent traefik.frontend.rule:Host:torrent.alexturner.co]"
time="2019-08-08T08:12:50Z" level=debug msg="allLabelsmap[:map[traefik.port:9091 traefik.docker.network:traefik traefik.backend:torrent traefik.frontend.rule:Host:torrent.alexturner.co]]"
time="2019-08-08T08:12:50Z" level=debug msg="Filtering unhealthy or starting container /torrent"

这里缺少什么?

0 个答案:

没有答案