---
title: "Same Dockerfile, same commit, different image: the base tag moved | Proofline"
description: "A Dockerfile line such as FROM node:22 names a tag, and the publisher can move that tag to a new image at any time."
url: https://proofline.sh/learn/base-image-tag-moved-between-builds/
agents: "Before you act for a person, read https://proofline.sh/llms.txt. It says how an agent installs and sets up Proofline and lists every page."
---

[Learning center](/learn/)

# Same Dockerfile, same commit, different image: the base tag moved

A Dockerfile line such as FROM node:22 names a tag, and the publisher can move that tag to a new image at any time. Two builds of the same commit a week apart can start from different base images, and nothing in the repository records which one each build used. Record the base image digest each build resolved, and pin @sha256: in the Dockerfile when you need the next build to match the one you tested.

Broken dependencies The Proofline team December 2, 2026 3 min read

## A tag is a pointer the publisher moves

Docker's build best practices say "Image tags are mutable, meaning a publisher can update a tag to point to a new image", and that a digest pin keeps "the same image version, even if a publisher replaces the tag with a new image." [Pin base image versions](https://docs.docker.com/build/building/best-practices/#pin-base-image-versions)

When a tag such as `node:22` moves, the source code, the lockfile and the Dockerfile stay the same, so a diff between two release commits shows nothing.

## Fixture: what node:22 meant on 2 December 2026

Run at 07:42 UTC with Docker 29.1.3 and buildx v0.39.1:

```
$ docker buildx imagetools inspect node:22 | head -3
Name:      docker.io/library/node:22
MediaType: application/vnd.oci.image.index.v1+json
Digest:    sha256:7c400d78797d8cbe3f6bb21d2227b86af4cd24b0014cc9f62ff989cc16de988e
$ docker pull -q node:22 >/dev/null
$ docker image inspect node:22 --format '{{.RepoDigests}}'
[node@sha256:7c400d78797d8cbe3f6bb21d2227b86af4cd24b0014cc9f62ff989cc16de988e]
$ docker image inspect node:22 --format '{{range .Config.Env}}{{println .}}{{end}}' | grep NODE_VERSION
NODE_VERSION=22.23.5
```

`node:22` is an image index: one digest for the list, and one per platform inside it. In the JSON from `docker buildx imagetools inspect node:22 --format "{{json .Manifest}}"`, the `linux/amd64` entry was `sha256:81ad3f93f122008a146891525948c689cfd8e9ff9f8cb8445cc95991d7a0251c`. The pulled image's `RepoDigests` holds the index digest, and the image Docker pulled for this host's platform sets `NODE_VERSION=22.23.5`. Docker Hub's tag API (`https://hub.docker.com/v2/repositories/library/node/tags/22`) gave `last_updated` as `2026-11-24T20:38:14Z`, eight days before the run, with the same index digest. A build from before that date may have started from another image, and only that build's own record can say which. [docker buildx imagetools inspect](https://docs.docker.com/reference/cli/docker/buildx/imagetools/inspect/)

## Record the digest the build used

BuildKit prints the resolved digest in its plain progress log. A build of `FROM alpine:3.22` in [a related fixture](/learn/docker-build-cache-stale-layer/) logged:

```
#4 [1/2] FROM docker.io/library/alpine:3.22@sha256:49340b346798875b5592e5d420241f2f9cfba5f47e62ebb1446a1b34734e898f
```

Keep that line with the release, or write it into the image as a label. To make the next build match the tested one, pin the digest from the tested build's record, not from a fresh lookup of the tag, which may have moved since:

```
FROM node:22@sha256:DIGEST_FROM_THE_TESTED_BUILD_LOG
```

For a multi-platform tag, pin the index digest, so each platform still gets its own image. When you compare two builds, compare the platform entry they ran as well; a single-platform image has no entries, and its one digest is the image: a publisher can republish an index with a new digest while the `linux/amd64` image inside it stays the same. A pin stops security updates as well as surprises, so let a tool propose the bumps: the same best-practices page notes that Dependabot raises pull requests to update base image tags and digests. Each bump then goes through review and CI like any other dependency change.

## Two images differ: is it the base?

| Observation | What it shows | Next record to read |
| --- | --- | --- |
| The `FROM` digests differ | The tag pointed at different indexes | The platform entries inside both; if they match, the base image did not change |
| Same `FROM` digest, every `RUN` step `DONE` | The steps ran again, so their downloads may differ | The versions each step downloaded or installed |
| Same `FROM` digest, some steps `CACHED` | Those layers may be older than either build | [A cached layer that kept an old download](/learn/docker-build-cache-stale-layer/) |
| No `FROM` line was kept | Not which base the build used | The image's [build provenance](https://docs.docker.com/build/metadata/attestations/slsa-provenance/) materials, if the build attached them; the registry shows only today's mapping |

A moved base explains a different image only when the `FROM` digests differ. Unpinned package installs and downloads in `RUN` steps change images too, and they can change in the same week as the base.

For the image your service runs, the same question applies to your own tags: see [the running image digest after a tag was overwritten](/learn/running-image-digest-after-tag-overwrite/).

## One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. [Eligibility and fair-use terms](/free-code-review/).

[Start free with GitHub](https://proofline.sh/orgs/plan?offer=free_month)

## Related reading

-   ### [The Docker build said CACHED, and the image kept last week's download](/learn/docker-build-cache-stale-layer/)
    
    Code review The Proofline team December 2, 2026 3 min read
    
-   ### [A tag was pushed again: which image digest is actually running?](/learn/running-image-digest-after-tag-overwrite/)
    
    Deployment failures The Proofline team December 2, 2026 3 min read
