containrrr/shepherd

Image cleanup will occurs only on node running the shepherd container

mulder999 opened this issue · 5 comments

Actual:
Actual implementation do the image cleanup only on the node running the shepherd container, not on the node running the service updated, nor on any other

Expected:
In decreasing preference order:

  • Cleanup on every nodes, keeping the image digest matching the updated image (rem: image digest is immutable not the image ID)
  • Cleanup on every nodes
  • Cleanup on node running the service
  • Limitation highlighted in documentation

Sorry for the late answer. Personally I think the integrated image cleanup was the wrong way to go. I propose to run docker system prune regularly on every docker node. That should solve all the problems. What do you think?

Hi thanks for reply. Yes this could do. Assuming this would force to have an agent on each cluster node as done by portainer. This local agent could then also help taking decision for smarter update trigger.

Agent.. Well.. Or keep it easy and add it as a cron job. (Unfortunately, swarm-cronjob does not reliably run global mode services, otherwise I would recommend that.)

Cron could actually replace shepered everywhere.

In fact, I was hoping to eventually replace my cron jobs by shepered but as is it provides too little value for me yet.

I have recently opened source of my service updating scripts:
https://github.com/shizunge/gantry

It has this feature enabled. Would you like to give it a try?