Report this

What is the reason for this report?

App is still running old docker image after successful deployment

Posted on February 11, 2021

My App is probably still running on an old docker image although I have pushed a newer images to the DO registry and the registry is also showing the correct SHA256 image ID.

I’ve successfully deployed the App a few times but it’s still showing old content. How can I verify, that my App is running on the same docker image ID/hash that the registry is displaying? I can’t find that information on the Apps control panel.



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.

Hello @rgnrlbrk, contrary to what the documentation would lead us to believe, automatic deployments after updating an image don’t actually work.

The issue was that I was always using the docker tag “:latest”. I don’t know why deployments worked for a couple of weeks but now it isn’t working anymore. My workaround is to use different tags now and put the new images into the app spec file like this:

doctl registry login
docker push $IMAGE_NAME

doctl apps spec get $DO_APP_ID > $SPEC_FILE

# Replace image in app spec
echo "Setting tag $TAG"
sed -i '' "s/tag: [a-z0-9]*$/tag: $TAG/g" app_spec.yml
doctl apps spec validate $SPEC_FILE

doctl apps update $DO_APP_ID --spec $SPEC_FILE

its concerning that this hasnt been addressed in over a year.

what ive found works is to use the create-deployment command with the “force-rebuild” option. oddly named considering the image is already built but i digress.

here is the command

doctl app create-deployment <app ID> --force-rebuild

# shorthand
doctl a cd <app ID> --force-rebuild

the bummer here is if you change the spec (which creates a new deployment) there is no “force-rebuild” for the update command. so you have to do both

doctl app update <app ID> --spec <app-spec>.yaml
doctl app create-deployment <app ID> --force-rebuild

#shorthand
doctl a u <app ID> --spec <app-spec>.yaml
doctl a cd <app ID> --force-rebuild

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.