# Can an upstream image change trigger a restart?

**URL:** <https://discuss.hashicorp.com/t/can-an-upstream-image-change-trigger-a-restart/19791>\
**Category:** Nomad\
**Created:** [January 15, 2021, 10:49pm UTC](https://discuss.hashicorp.com/t/can-an-upstream-image-change-trigger-a-restart/19791 "2021-01-15T22:49:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aardvarq](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/aardvarq/32/13860_2.png) [@aardvarq](https://discuss.hashicorp.com/u/aardvarq)\
**Post date:** [January 15, 2021, 10:49pm UTC](https://discuss.hashicorp.com/t/can-an-upstream-image-change-trigger-a-restart/19791/1 "2021-01-15T22:49:58Z")

</div>

I want the app to pull `image:latest` and restart when that image is updated upstream. Is this possible?

---

<div class="post-metadata">

**Author:** ![shantanugadgil](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/shantanugadgil/32/923_2.png) [@shantanugadgil](https://discuss.hashicorp.com/u/shantanugadgil)\
**Post date:** [January 18, 2021, 9:58am UTC](https://discuss.hashicorp.com/t/can-an-upstream-image-change-trigger-a-restart/19791/2 "2021-01-18T09:58:47Z")

</div>

I don’t think there is any native construct to achieve this in Nomad as the checksum of the image would be evaluated at the “pull” and not during the life of the task.

What could be possible though, is to have a hacky workaround … this is just off the top of my head, I haven’t tried this.

- have some task polling the docker repo for the image and update the checksum into Consul.
- have a template stanza which has `restart` set on the value of the checksum changing.
