Can an upstream image change trigger a restart?

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

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.