Modern Docker Management, Designed for Everyone
Go composecontainer-managementcontainersdockerdocker-composedocker-managementgoself-hostedsveltekittypescriptweb-ui
fix: send notification on single container update (#2357)
Giulio Savini1f8d72f05a1e
diff --git a/backend/internal/services/updater_service.go b/backend/internal/services/updater_service.goindex 7e74176ca..2ef5bc812 100644--- a/backend/internal/services/updater_service.go+++ b/backend/internal/services/updater_service.go@@ -624,6 +624,12 @@ func (s *UpdaterService) UpdateSingleContainer(ctx context.Context, containerIDout.Checked = 1out.Duration = time.Since(start).String()+ if s.notificationService != nil {+ if notifErr := s.notificationService.SendContainerUpdateNotification(ctx, containerName, imageRef, inspectBefore.Image, normalizedRef); notifErr != nil {+ slog.WarnContext(ctx, "Failed to send container update notification", "containerID", containerID, "containerName", containerName, "imageRef", normalizedRef, "error", notifErr.Error())+ }+ }+// Prune old image if no longer in useif inspectBefore.Image != "" {_ = s.pruneImageIDsWithInUseSetInternal(ctx, []string{inspectBefore.Image}, nil)@@ -652,6 +658,12 @@ func (s *UpdaterService) UpdateSingleContainer(ctx context.Context, containerID})out.Updated+++ if s.notificationService != nil {+ if notifErr := s.notificationService.SendContainerUpdateNotification(ctx, containerName, imageRef, inspectBefore.Image, normalizedRef); notifErr != nil {+ slog.WarnContext(ctx, "Failed to send container update notification", "containerID", containerID, "containerName", containerName, "imageRef", normalizedRef, "error", notifErr.Error())+ }+ }+// Clear the update record for this exact image ID when no running container still uses it.// This avoids repo-name canonicalization mismatches (e.g. "nginx" vs "docker.io/library/nginx").if inspectBefore.Image != "" {