Skip to content

Conversation

mtongnz
Copy link
Contributor

@mtongnz mtongnz commented Apr 6, 2024

This PR fixes the update status reported in unRaid for compose created containers.
It uses the DockerUpdate class from Dynamix Docker Manager (i.e. dockerman).

This will run when Compose Manager updates stacks. There is also a "check for updates" button for each compose project to manually do the check.

@mtongnz
Copy link
Contributor Author

mtongnz commented Jun 13, 2024

@dcflachs can you review this when you get a chance. Cheers

@andrebrait
Copy link

On what versions of unRAID has this been tested? Just to be sure if I should try it or not. Running 6.12.11 right now, planning on upgrading to 7 as soon as the overlay2 situation on ZFS gets resolved.

@mtongnz
Copy link
Contributor Author

mtongnz commented Aug 7, 2024

On what versions of unRAID has this been tested? Just to be sure if I should try it or not. Running 6.12.11 right now, planning on upgrading to 7 as soon as the overlay2 situation on ZFS gets resolved.

I'm running 6.12.11
Wasn't planning on moving to 7 until stable is released

@mtongnz
Copy link
Contributor Author

mtongnz commented Aug 17, 2024

@dcflachs have you had a chance to look at this PR? Would be great to have a fox for this issue.
Cheers

@dcflachs
Copy link
Owner

dcflachs commented Sep 6, 2024

@mtongnz I will take a closer look at this in the next couple of days. One initial thought on first glance is that I am not sold on having the "Check for Updates" button per stack. I think that the "Check for Updates" button on the docker page will also check non-dockerman containers, which i think should be sufficient.

@andrebrait
Copy link

@mtongnz I will take a closer look at this in the next couple of days. One initial thought on first glance is that I am not sold on having the "Check for Updates" button per stack. I think that the "Check for Updates" button on the docker page will also check non-dockerman containers, which i think should be sufficient.

Yes, it does check for everyone.

My current workaround is a user script that simply deleted the JSON filed where it keeps the update statuses for images and I then re-trigger the check for updates via the button.

It's inefficient, but it works.

I guess if you were to replace the old image hash in the file with the new one, for the updated container, it would have the same effect?

@mtongnz
Copy link
Contributor Author

mtongnz commented Sep 6, 2024

You are correct that the unRaid button will check for updates. The button I added does that just for the stack but also updates the hash for each container if needed. This was to clear the "updates available" flag. Not totally necessary as the hash is updated when updates are installed with this PR. I found the button useful to clear all the "update available" when I knew the stacks are already up to date.

@ashishpandey
Copy link

ashishpandey commented Sep 6, 2024

@mtongnz I will take a closer look at this in the next couple of days. One initial thought on first glance is that I am not sold on having the "Check for Updates" button per stack. I think that the "Check for Updates" button on the docker page will also check non-dockerman containers, which i think should be sufficient.

I agree. I have only applied DockerUpdate.php call in the update section to my server and that is sufficient for me

The in-built unraid check for updates discovers any out of date images, including those managed by compose plugin, and then update stack updates them and synchronises the state with dockerman

@ashishpandey
Copy link

@dcflachs any further inputs for this PR? keen to help in any way if this can get into the release version. Having to apply this at every reboot is a bit of an hassle, even with partial automation I have for this

@mtongnz
Copy link
Contributor Author

mtongnz commented Dec 27, 2024

Any chance this can be merged?

@ashishpandey
Copy link

This approach still works with unraid 7.0.0

Since this PR is still not accepted, I am applying the bare minimum change from this manually on my server on every reboot for now. The bare minimum being:

under /usr/local/emhttp/plugins/compose.manager

  1. copy php/DockerUpdate.php
  2. Add following to the end of the update switch statement in scripts/compose.sh (just before following ;;)
# Update unRaid's local/remote image versions database so GUI shows correct info about updates
docker compose -p "$name" ps --format "{{.Image}}" | php /usr/local/emhttp/plugins/compose.manager/php/DockerUpdate.php 2>&1

@mtongnz
Copy link
Contributor Author

mtongnz commented Apr 7, 2025

@dcflachs have you had a chance to review this? Would be great to clear off the update flags

@dcflachs
Copy link
Owner

dcflachs commented Apr 8, 2025

There is no longer a reason to try and integrate update checking with Dockerman. As of unRAID version 7.0.0 the webui no longer tracks / displays update status for containers that are not managed by Dockerman, including those managed by compose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants