getwud / wud

WUD (aka What's up Docker?) gets you notified when a new version of your Docker Container is available.
https://getwud.github.io/wud/
MIT License
1.19k stars 38 forks source link

Cannot get a reliable tag for this image #406

Open kazkame opened 4 months ago

kazkame commented 4 months ago

using docker swarm, my wud instance does not detect any of my containers. The web pannel loads correctly. It just says: "no containers found" When I look at the logs I have:

13:47:10.097 WARN whats-up-docker/watcher.docker.local: Cannot get a reliable tag for this image [fmartinou/whats-up-docker:6.4.1@sha256:1c00b6e8ae4b24dxxx387a1a84dd47c7aeb4371dxxxec673cdbb64ed16a463xxxxxe4ffe688]

And it shows that warning for all of my containers.

Here is my compose:


version: '3.9'

services:

  whatsupdocker:
    image: fmartinou/whats-up-docker:6.4.1
    networks:
      - backend_network
      # - wp1_network
      # - wp2_network
      # - wp3_network
      # - wp4_network
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
        delay: 10s
        max_attempts: 10
        window: 15s
      labels:
        #DEFAULT HEADERS
        - "traefik.enable=true"
        - "traefik.http.routers.wud.rule=Host(`wud.xxxxxxxxxxxxxxxx.fr`)"
        - "traefik.http.routers.wud.entrypoints=websecure"
        - "traefik.http.routers.wud.middlewares=secHeaders@file"
        - "traefik.http.routers.wud.tls=true"
        - "traefik.http.routers.wud.tls.certresolver=letsencrypt"
        - "traefik.http.routers.wud.tls.options=default"
        - "traefik.http.services.wud.loadbalancer.server.port=3000"
        #HOMEPAGE HEADERS
        - "homepage.group=Applications"
        - "homepage.name=wud"
        - "homepage.icon=wud.png"
        - "homepage.href=https://wud.xxxxxxxxxxxxxxxx.fr"
        - "homepage.description=wud Server"
        - "homepage.weight=15"
        #WUD HEADERS
        - "wud.tag.include=^\\d+\\.\\d+\\.\\d+$$"
        - "wud.link.template=https://github.com/fmartinou/whats-up-docker/releases/tag/$${major}.$${minor}.$${patch}"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - wud_store:/store
    healthcheck:
      test: wget --no-verbose --tries=1 --no-check-certificate --spider http://localhost:3000
      interval: 10s
      timeout: 10s
      retries: 3
      start_period: 10s

volumes:

  wud_store:
    external: true

networks:
  backend_network:
    external: true
  # wp1_network:
  #   external: true
  # wp2_network:
  #   external: true
  # wp3_network:
  #   external: true
  # wp4_network:
  #   external: true
kazkame commented 4 months ago

Nm I am using Portainer and I think Portainer deploying is not supported.

EthraZa commented 2 days ago

Why would Portainer be a problem to deploy? I'm facing the same errors. It can't "get" itself:

18:13:45.425  WARN whats-up-docker/watcher.docker.local: Cannot get a reliable tag for this image [getwud/wud:latest@sha256:1bb63fc4940b047dc697f0629fa8cbfd4242f4a05c8fab11e7df931a0e62eb26]

Deploying with Portainer too but it finds 5 of 38 containers running in the swarm. Maybe it is the swarm mode the problem?

fmartinou commented 1 day ago

Swarm mode is not currently supported; that's probably the cause of your issue.

goegol commented 1 day ago

@fmartinou when you do expect support for swarm?

phrreakk commented 1 day ago

Swarm and WUD are working fine for me. Somewhat insecure design as you have to enable docker TCP access...but it is internal to my LAN. I just deal with it.

Essentially, you have to add each node as a watcher. Reference each node in your WUD env vars:

volumes:
      - /var/run/docker.sock:/var/run/docker.sock
environment:
      - WUD_WATCHER_node01_HOST=node01.hostname
      - WUD_WATCHER_node01_PORT=2375
      - WUD_WATCHER_node02_HOST=node02.hostname
      - WUD_WATCHER_node02_PORT=2375
      - WUD_WATCHER_node03_HOST=node03.hostname
      - WUD_WATCHER_node03_PORT=2375

Then you just need to move your labels from the service to the container:

labels:
  - 'wud.tag.include=^\d+\.\d+\.\d+$$'
  - 'wud.link.template=https://github.com/getwud/wud/releases/tag/$${major}.$${minor}.$${patch}'
deploy:
      mode: replicated
      replicas: 1
      resources:
        limits:
          memory: 512M
        reservations:
          cpus: '0.5'
          memory: 128M
      labels:
        - "traefik.enable=true"
        - "traefik.docker.network=traefik_public"
        - "traefik.http.routers.wud.rule=Host(`wud.hostname`)"
        - "traefik.http.routers.wud.entrypoints=websecure"
        - "traefik.http.services.wud.loadbalancer.server.port=3000"   

My idents probably aren't perfect, but that should get you closer to a working config.