Hi there,
We’re using a third party image from docker hub for the source of one of our app platform components.
The third party releases bug fixes using the same tag, as in the 7.0 tag has recently been updated with version 7.0.9 with a new image and digest. Overwriting the old 7.0.8 version. The problem seems to be that whenever we update the app platform component it continues using the same version from when the component was first created.
So while our staging and production environments are both pointing to the same 7.0 tag, they’re actually running different versions of the container as staging was created long before production. Our staging component is running 7.0.2 while production is on 7.0.8.
I’ve tried forcing an update to use the most recent digest for the tag by updating the source tag to a different tag and back to 7.0 again as well as updating env vars to trigger a redeploy of the component. Each method failed as it seems like digital ocean has cached the old digest for that tag for the component meaning that each time we go back to 7.0 it carries on using the old version and doesn’t pull down the most recent digest for that tag.
What I was wondering about is if there is a way to clear the reference to the old digest for the component so when we redeploy the component it pulls down the most update to that tag please?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi there,
Indeed, overwriting tags when using Docker images can cause problems, as you have experienced.
Once an image with a specific tag is pulled and cached, subsequent pulls may not retrieve the latest version of that tag unless the cache is cleared or forced to update.
Best practices are to avoid overwriting tags, especially in production environments, and to use unique tags for each release, even incremental ones. That way, you can avoid confusion and unexpected behaviors.
However, in your current situation, you can try the following:
image:7.0
, use the digest directly, for exampleimage@sha256:<digest>
.7.0
tag, use a distinctly different tag temporarily, deploy your application, and then switch back to7.0
. This may force the platform to refresh the image from the repository.Hope that helps!
- Bobby.