Update containers on Rancher 2.x without changing tag every time

Marc-Andre Roy | Nov 25, 2019 min read

Editor’s Note (January 2025): This 2019 article remains functionally relevant, though Rancher’s interface has evolved. The core concept — instructing Rancher to always retrieve images from the registry — remains valid despite interface changes.

The Problem

During development testing in a dedicated environment, developers often need to rapidly iterate. Pushing test code updates (such as console logging) to a container, tagging it consistently, pushing to a private Docker registry, then redeploying via Rancher — the expected changes never appeared in the running application.

After investigating the container’s file system via Rancher’s shell access, the source became clear: Rancher was serving a cached image matching the specified tag rather than fetching the latest version from the registry.

The Solution

To force Rancher to retrieve the latest image on each redeployment without changing tags, follow these steps:

  1. Access the workload edit interface.
  2. Scroll to advanced options at the bottom of the page.
  3. Expand the “Security & Host Config” section.
  4. Locate the “Pull Image” setting and select “Always”.
  5. Click the “Upgrade” button to apply the changes.

With this configuration enabled, Rancher will now always pull from the repository when redeploying the workload, enabling developers to reuse identical tags repeatedly during testing cycles.