Unable to update containers in Synology DSM running Container Manager #168
Replies: 12 comments 9 replies
-
Thank you for creating a new issue for further discussion.
I don't have any synology products myself so can't test - but I would assume the Container Manager is somewhat similar to Portainer in that it creates its own directory structure and handle things a bit different with mounts and compose. You could check some of this by running the
That's probably because (as you mentioned) due to Dockcheck using registry hashes to determine updates while CM maybe uses tags/releases only. Dockcheck will see any change as an update, everything from a typo to a full rebuild. As @yoyoma2 suggested - if you'd like to use Dockcheck for doing the updates, you should probably set things up using plain docker compose in the CLI. I don't know if there's anything I can do or change to support the Synology setup better. |
Beta Was this translation helpful? Give feedback.
-
On synology DSM I use dockcheck only for the notifications and manage the docker updates with the Container Manager GUI. I had noticed that the newly available images were not always seen by Container Manager so the following lines were added to the DSM notify template. Make sure your DSM notify template is up to date.
Since these lines were added, whenever I get a notification from dockcheck, I also see them from the CM GUI. You could create a scheduled task that runs that command as root on the schedule you prefer. I don't know how often DSM runs this check itself but it doesn't seem to be very frequent. |
Beta Was this translation helpful? Give feedback.
-
@firmlyundecided is there anything else I can do for you in this regard or have you resolved your issues? |
Beta Was this translation helpful? Give feedback.
-
Perhaps dockcheck could detect DSM and refuse to update containers or at least warn to avoid using the DSM GUI.
I have zero user_managed_compose_project since I don't use projects (DSM's term for docker compose).
Perhaps the dockcheck update would work on containers run without a project like mine but I never dared to try. |
Beta Was this translation helpful? Give feedback.
-
I'm not sure what the best solution is. @yoyoma2's suggestion is interesting. perhaps it's even a call-out in the docs, to be a little more light-handed. The actual ideal solution would be to figure out how to force Container Manager to play nice, but 1/ that's above my pay grade, and 2/ my experiences tell me that Container Manager and DSM simply isn't the nicest Docker environment to play in. |
Beta Was this translation helpful? Give feedback.
-
While this is sensible - I'm a bit hesitant to start adding specific checks and warnings for different environments - I mean there's a bunch of different Hypervisors/VMs/LXCs/OSes/Environments that all can be modified by the user.
See above - but yes, mentioning it in the docs sounds reasonable. A heads-up section.
As I don't have a DSM myself (someone gift me one please! 😁 ) I cant really dive in to that even if I'd have time. But yes I'm afraid it probably uses some custom layering / embedded subvolumes or similar. |
Beta Was this translation helpful? Give feedback.
-
Agreed re: documentation call-out, that users leveraging DSM's container manager may have issues automatically updating containers via the tool. To help your documentation, here's the quick setup for automating Dockcheck via DSM's Task Scheduler:
Note: This setup will result in two emails sent, one by dockcheck (due to the -I flag) and one by DSM. The dockcheck email only includes the notification of available updates, while the DSM email shows the entire script as run. This is a user preference, and both are not necessary. Since Dockcheck cannot directly update containers in Container Manager, at least one email notification option should be enabled to use Dockcheck so you can be aware of manual updates available. |
Beta Was this translation helpful? Give feedback.
-
I like that! Also nice documentation @firmlyundecided ! |
Beta Was this translation helpful? Give feedback.
-
Thank you @firmlyundecided for the provided screenshots and writeup! I'll surely implement it somehow. I'll convert this issue to a discussion! |
Beta Was this translation helpful? Give feedback.
-
I've added some info in a new branch, please check it out and reply with any changes (or make PR to the branch)! |
Beta Was this translation helpful? Give feedback.
-
Updating my original Note with clearer caveats and changes below. Using Dockcheck in DSMDockcheck cannot directly update containers managed in the Container Manager GUI, but it can still be used to notify you of containers with updates available. There are two ways to be notified, each with their own caveats:
This is a user preference, and both notifications are not necessary. However, regardless of the notification method, it is necessary to set up a scheduled task to run Dockcheck at a set interval (otherwise it will only run when manually triggered). Automate Dockcheck with DSM Task Scheduler:
Set up the DSM Notification templateCopy the dockcheck/notify_templates/notify_DSM.sh to the same directory as where you keep |
Beta Was this translation helpful? Give feedback.
-
Pushed this to main now! Thank you both. I'll gladly receive any suggestions or improvements in the future, just hit me up with a PR, issue, discussion or message me directly ( |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Running dockcheck on a Synology DS1522+ to evaluate docker containers running in container manager. Dockcheck works as intended, successfully identifying updates and sending email notifications using the DSM template. However, it is unable to execute updates for containers running in Container Manager.
When attempting to execute an update, I'm met with the following error:
Error response from daemon: Conflict. The container name "/container-name" is already in use by container "long-string". You have to remove (or rename) that container to be able to reuse that name.
This error persists regardless of if the update is triggered via -a or -y tag, or specific container selected via prompt. All Container Manager containers in question are built using docker compose files within in the Container Manager GUI.
Additionally, dockcheck identifies image updates that are not visible for updating in the Container Manager GUI. Unlikely this is due to image changes without new tags, as it's confirmed to affect images that have seen new releases tagged in github.
Referencing a comment made in an earlier issue, suggesting dockcheck will not work when using the Container Manager GUI.
Originally posted by @yoyoma2 in #161
Beta Was this translation helpful? Give feedback.
All reactions