whats-up-docker
whats-up-docker copied to clipboard
Possibility to use Lifecycle Hooks
Hey there,
I'm wondering if it would be possible to have something like a lifecycle hook to call a script after a container was successfully updated (similar to watchtowers post-update hook). Background of this question is that I want to call a microservice with the new version such that I can built up for each container a version history which can be used for rollbacks later on.
Hi @t-pohl
That's a great idea 👍 .
I don't know if it's better to add a hook system like Watchtower (running shell scripts) or if I enrich the wud trigger
system by making possible to trigger on multiple events:
- update-available (the only event currently triggered by wud)
- update-pre
- update-post 🤔
The advantage to integrate with the trigger system would be that you can leverage all the implemented triggers (http, mqtt...)
(but I will also have to implement a command
trigger to give the possibility to run arbitrary commands or scripts)
Hi @fmartinou , it sounds to me more natural (and if done right more powerful) to extend the existing trigger system like you described :+1: So yeah feel free to treat this as a kind feature request :smile:
Can you @fmartinou apply the "enhancement" label or should I be able to do that? Sorry for the basic question, I'm not using Github that much.
Can you @fmartinou apply the "enhancement" label
Done :)
I would also find this useful. I have a locally hosted image that is dependent on another image hosted on Docker Hub. My CI/CD pipeline does not have a way to monitor Docker Hub and build if the image on Docker Hub is updated. update-pre
could allow me to execute a shell script to use my CI/CD pipeline cli to kick off a new build when the Docker Hub image is updated and then update the running container on completion.