Base image uses the latest tag

Using the latest tag can select a different base image in later Docker builds.

Description

latest follows the publisher’s tag and may point to a different image at the next build. The tag name alone does not tell you which release it contains.

Potential impact

An unexpected base-image change can break compatibility and make rollback harder.

Remediation

Choose a version tag for each environment. For a repeatable build, pin a verified digest as well. In image:latest@sha256:..., the digest selects the contents. Update the pin when adopting a security fix.

Examples

Before

dockerfile
FROM alpine:latest

After

dockerfile
FROM alpine:3.22

The example switches from alpine:latest to the 3.22 series. Both tags can move.

References