-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flag in jobfile.nomad to force pull docker images from registry #639
Comments
I hit this need as well, there are small fixes one would like to force push without generating a new tag. Being able to force pulls will allow redeploying the same image including the small fixes. |
ok, I think this is not neccesary since the docker driver has this feature: Lines 649 to 674 in 9b00c9e
I think what happened to me is that the container stopped but for some reason the docker engine couldn't delete the container, so the image couldn't be deleted neither. @dadgar could you please confirm how this works? thanks!!! |
@adrianlop: What you described is correct! |
@dadgar thanks. what do you think about adding a delay between these operations? |
Why would you want a delay? It may be easier to just support the force_pull, I don't think the UX of a delay is very nice. |
you're right, it's better that way. |
Closing as when the tag is latest we check if the cached version is truly the latest. |
Nicely done, thanks Alex! |
great, thank you ! |
I think that it should be possible to optionally check the cache version on other tags that aren't latest. We have an image tag on specific commits for production workflows but other tags for dev/testing that get updated very frequently on new commits. Latest is helpful for now but it ends up creating an image with the develop tag in the name instead of as an actual tag. Thanks! |
@sheldonkwok good point! |
Note: if you don't supply a specific tag to Docker, it will assume you mean |
Hi Marcel, the code path for specifying and not specifying the latest tag is exactly the same (the tag will always be 'latest'): https://github.com/hashicorp/nomad/blob/master/client/driver/docker.go#L443-L464 . It should therefore always pull the image. Did you reproduce different behaviour? |
Hm, in that case I'm mistaken. Sorry for adding confusion. |
No problem, just checking!: -) |
@dadgar We also use two tags . One for qa and one for prod. force_pull = true would be awesome. Is there any ETA ? |
I guess this didn't make it into 0.4.1? |
@a86c6f7964 No it didn't. We didn't get time to pick this up. |
Will this feature make 0.5.0? |
It did not make the RC as far as I can see from the changelog, so next potential target would be 0.5.1. :) |
Darn I didn't get to upgrade to 0.4.1 because I didn't have time to repatch |
+1 |
Is this issue open for PR? Anyone already doing it? Otherwise i'll bother to make PR myself. It looks supereasy. |
@t3hk0d3 A PR would be appreciated! |
@dadgar is that pull request in line with what you would like to see? why did this get pushed out to 6.0? |
@a86c6f7964 Nope I changed the milestone before I saw your PR. Will look at it today |
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
Hi,
I think it's very useful for staging environments to have a config flag like this one:
By
force_pull = true
I mean that Nomad should always executedocker pull docker-registry.foo.bar/foo/dockerimage:tag
before launching the docker image, because in test envs we always work with the 'latest' tag or a milestone tag before having a final docker image version (I think that's the easy way to go with Docker).What do you think?
Thank you!
The text was updated successfully, but these errors were encountered: