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.18k stars 38 forks source link

Not updating images. What am I missing? #280

Open thehijacker opened 1 year ago

thehijacker commented 1 year ago

Hello,

Strugling to make this work. I have two triggers. Telegram to send me message on update and dockercompose that should handle, downloading, restarting container and pruning old images. This is my config:

whatsupdocker:
    image: fmartinou/whats-up-docker
    container_name: wud
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /etc/localtime:/etc/localtime:ro
      - /mnt/usb_1/Docker/WUD:/store
      - /root/docker-compose.yml:/wud/docker-compose.yml
    environment:
      - TZ=Europe/Ljubljana
      - WUD_TRIGGER_TELEGRAM_1_BOTTOKEN=AAA
      - WUD_TRIGGER_TELEGRAM_1_CHATID=BBB
      - WUD_WATCHER_LOCAL_CRON=0 1 * * *
      - WUD_TRIGGER_DOCKERCOMPOSE_MAIN_FILE=/wud/docker-compose.yml
      - WUD_TRIGGER_DOCKERCOMPOSE_MAIN_BACKUP=true
      - WUD_TRIGGER_DOCKERCOMPOSE_MAIN_PRUNE=true
      - WUD_TRIGGER_DOCKERCOMPOSE_MAIN_MODE=batch
      - WUD_REGISTRY_HUB_LOGIN=akralj
      - WUD_REGISTRY_HUB_PASSWORD==qAAA
      - WUD_REGISTRY_LSCR_TOKEN=BBB
      - WUD_REGISTRY_GHCR_TOKEN=CCC
    ports:
      - 3009:3000

For some containers I have this so they are not watched (must stay with set version):

    labels:
      - wud.watch=false

Cron start at 1am. It currently shows I have two updates but why it didn't update them at 1am? I expect to see on my Telegram that there were two updates and that when I look in morning I am on latest version.

I have read the documentation and many tutorials, but for sure I am still missing something to make this work.

Thank you.

fmartinou commented 1 year ago

Hi,

Can you enable debug logs (WUD_LOG_LEVEL=debug) and paste them here, please? Furthermore; what registries come the 2 images to update from? (hub? lscr? ghcr?)

thehijacker commented 1 year ago

Hello,

Find log attached. At 1am cron job started.

wud-2023-05-09T05-08-36.zip

This is what I got on Telegram:

image

I checked log for uptime-kuma and container was restarted at around 1am, and I am now using latest 1.23.3 version. In WUD GUI I can still see all three containers are still with update available:

image

My docker compose settings for Uptime-kuma are:

  uptime-kuma:
    image: louislam/uptime-kuma:latest
    container_name: uptime-kuma
    volumes:
      - /mnt/usb_1/Docker/Uptime-kuma:/app/data
    ports:
      - 3001:3001
    restart: always

So I guess now it is updating but status is not refreshed? I also just now noticed that my docker-compose.yml is corrupted. There is a docker-compose.yml.back file but it is identical as docker-compose.yml and both are trunced at end. So docker-compose up -d for example is not working.

root@docker-server:~# docker-compose up -d
[+] Running 4/5
 ⠿ syncthing Pulled                                                                                                                                                                  1.6s
 ⠿ transmission Pulled                                                                                                                                                               1.6s
 ⠿ sabnzbd Pulled                                                                                                                                                                    1.6s
 ⠿ rustdesk_server Error                                                                                                                                                             1.8s
 ⠿ freshrss Pulled                                                                                                                                                                   1.6s
Error response from daemon: manifest for rustdesk/rustdesk-server:l not found: manifest unknown: manifest unknown

I need to dig for nightly backup and hope I can restore it. Can you see from log what went wrong?

Thank you.

thehijacker commented 1 year ago

Gave up on docker compose trigger. Only using docker now. And it seems to work correctly. Not even sure why I tried with docker-compose. I do not need image version to change. Most of my containers uses fixed versions (wud ignores them using label) others are set to latest and I do not need WUD to change this inside docker-compose file. Just update them if needed once per night :).

Maybe my docker-compose is too complicated. I have lot of comments inside for example starting with #. Luckily I had daily Proxmox LXC backups and I could extract my original docker-compose.yml file.

I think you can close this ticket.

jopvanraaij commented 10 months ago

I had the same issue (using WUD 6.3.0): WUD does not pull/start new image, while it does detect a new image is available.

Updating the restart policy from always to unless-stopped and reloading that docker-compose file made WUD update the container. Guess there is a bug in WUD for the always restart policy?