Question

How to deploy a new digest with the same tag to an app platform component

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?


Submit an answer


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!

Sign In or Sign Up to Answer

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.

Bobby Iliev
Site Moderator
Site Moderator badge
November 2, 2023
Accepted Answer

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:

  • Instead of using tags like image:7.0, use the digest directly, for example image@sha256:<digest>.
  • Before switching back to the 7.0 tag, use a distinctly different tag temporarily, deploy your application, and then switch back to 7.0. This may force the platform to refresh the image from the repository.
  • Sometimes caches may be the cause, and you may need DigitalOcean’s support team to help you force an image refresh.

https://www.digitalocean.com/support/

Hope that helps!

- Bobby.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel