Keeping Dokku Apps Fresh: The Easy Way to Update Deployed Images

Hi, I am Vivek, a 26 years old developer from India. I love making apps. You can check my github for some of my open source projects.
Search for a command to run...

Hi, I am Vivek, a 26 years old developer from India. I love making apps. You can check my github for some of my open source projects.
No comments yet. Be the first to comment.
Migrating a production database is often a high-stakes operation. Traditional "dump and restore" methods require significant maintenance windows, leading to service downtime. To solve this, PostgreSQL offers Logical Replication, a native mechanism th...

Lately, my internet has been throwing tantrums — not because the connection itself is bad, but because every time the power blinks, my router decides it's time for a little nap. Naturally, the obvious

So, one day I saw my old laptop sitting there, collecting dust like it was auditioning for a role in an apocalypse movie. And then it hit me: "Why not turn it into a server?" There was just one minor hiccup. Its Ethernet port was as dead as my dreams...

Recently I was tasked with setting up kubernetes cluster with an Nginx Ingress. As a newcomer to Kubernetes, I tackled this setup and learned a thing or two along the way. Let me walk you through my experience and share some helpful tips. The Goal: S...

Ever found yourself in the endless cycle of "delete Docker image, redeploy, repeat" to keep your Dokku apps updated? You’re not alone. If your Dokku-deployed application relies directly on a Docker image (perhaps from Docker Hub or your private registry), you might've noticed a frustrating behavior: once Dokku pulls the image even when you use the latest tag it won’t fetch updates unless you manually delete the old image.
This got me scratching my head until I stumbled onto an elegant fix that streamlines the workflow and fits perfectly into the minimalist, automation-loving philosophy I share here.
By default, Dokku holds onto the Docker image it fetched during the initial deploy. No matter how many times you rebuild or redeploy with the same tag, Dokku won’t pull a fresher image from the registry unless you interfere by deleting it manually.
Dokku’s flexibility shines if you know where to look. The trick is to tell Dokku to pull the latest image from your registry every time you rebuild—completely bypassing the need to manually delete old images.
You'll use Dokku's docker-options to modify how the build and deploy steps work for your app.
dokku docker-options:add <app-name> build --pull --no-cache
Replace <app-name> with the name of your Dokku app.
--pull makes sure Docker pulls the latest version of the image from your registry.
--no-cache ensures Docker doesn’t use a cached image locally.
Now, whenever you want to update to the latest image (say, after pushing to your Docker registry), run:
dokku ps:rebuild <app-name>
That's it! Dokku will pull down the freshest image, rebuild, and restart your app—no more manual deletions required.
This approach works wonders for keeping your Dokku deployments lean and up-to-date.