-
Notifications
You must be signed in to change notification settings - Fork 18.7k
force docker deploy to pull new images #30951
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
Comments
/cc @nishanttotla @aaronlehmann |
@vdemeester let's say you have a service created using just a tag, such as When you run See #24066 (comment) |
The Ideally though, it's recommended to use either a fixed tag, or an immutable digest in the docker compose file |
I'm pretty sure |
Using
Does "re-resolve" the digest |
Are there any plans to allow force updating the latest digest without providing --image ? |
No plans that I know of. I suppose we could have a flag that caused the digest to be re-resolved based on the tag, but there are already a lot of flags and since this is something that can be done without a dedicated flag, I'm not sure it's justified. |
would be really helpful |
From my point of view I think that it will be really quick & easy to deploy a new version of the stack just by having this option. When working in a Swarm Cluster, it will be quite helpful to "upgrade" the services version calling something like:
Which could gradually pull the images of the new services, and deploy the instances. By using the healthchek option someone could achieve zero-downtime when "updating" or "upgrading" their services in a Swarm cluster. Hope to hear something about these soon. Thanks in advance! |
Totally agree with Nagoo. A And you can say "Well, then just bump the tag version numbers". More thanks in advance, in addition to those given by Nagoo! |
This should be fixed in |
Just tried this with
and
So it seems for that you have to use What I expected is that with
Or should this only working with a specific tag? //edited:
Has changed where? |
Another test:
Portainer was running version 1.14.x |
I guess there was a testing problem at my (and maybe others) site - as I commented here: |
Besides that the defaults are wrong, imho, this seems to imply a huge performance penalty. Timing this with No changes applied locally:
|
@thaJeztah No, it does not. After executing
|
When deploying a service, the images are pulled, and referenced, by digest, so the pull triggered by the service update won't update the existing To verify which image the service is running, use |
@thaJeztah |
@balthild is |
@thaJeztah Yes, it's private. But if I delete the service and remove the images on the worker manually, then re-create the service, the worker CAN pull the latest image. This shows that the issue is not caused by authentication. Anyway, I've switched to k8s. Docker swarm has wasted my time too much. |
@ thaJeztah
Is there some way to update the existing |
I wrote a script that would do the redeploy locally https://gist.github.com/trajano/82982c229948df445ada518d7c6273df |
I found a solution to pull new image with
|
@dekmabot I think that's just image SHA not necessarily the commit. |
(running docker 1.13.1 experimental mode, using docker deploy w/composer v3 file).
Occasionally, for reasons unknown to me, updating a stack by running
docker deploy
does not check for and pull newer images. I don't know how to recover from this other than doingdocker pull
on each host.docker stack rm xxxxx
, and re-deploying does not help.Specifying the sha would help, but I don't see how that is practical, when deployment is run from a CD pipeline.
I searched for CLI flags or existing issues, but couldn't find any.
When I issue a
docker pull <image>
the swarm manager I'm talking to reports the image as up-to-date, but if I login to another manager, it does download the newer image.The text was updated successfully, but these errors were encountered: