Nomad does not download latest docker image

1,101 views
Skip to first unread message

John Wong

unread,
Aug 5, 2018, 7:43:17 PM8/5/18
to Nomad
Here is my hello world hcl file: https://gist.github.com/yeukhon/5412eeec74000455060094ccf50970cf

    task "hello-task" {
     driver = "docker"
     config {
       image = "registry/username/helloworld/0.1:latest"
       port_map {
         http = 8000
       }
     }

I changed the response from hello world to bye world as a test. But it seems like Nomad would not download the newer latest docker image I have published even though my registry has a modified latest image available. I can force it to use another version of course if I change the tag. Thoughts? I am running Nomad v0.8.4

I understand it's possible Nomad caches docker image locally, but the sha checksum is different, so why wouldn't Nomad pull the latest? Thank you.

Edson Yamada

unread,
Aug 5, 2018, 8:46:10 PM8/5/18
to John Wong, Nomad

This is strictly connected to docker's behavior.

If you a run a "docker run my-container:latest" and you already have a mycontainer-latest image locally, docker won't check whether there's a newer version or not of mycontainer-latest -- it will simply run the local image. It's up to you to explicity run  "docker pull" before if you want to ensure the image is up to date. 




--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/nomad/issues
IRC: #nomad-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Nomad" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nomad-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nomad-tool/9f54abf9-a264-4e97-b67e-1100b2148ce0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matt Veitas

unread,
Aug 5, 2018, 11:23:05 PM8/5/18
to Nomad
See the force_pull option for the docker driver: https://www.nomadproject.io/docs/drivers/docker.html#force_pull

-Matt
Reply all
Reply to author
Forward
0 new messages