Skip to content

Feature request: registry-side tagging for unchanged images in CI #6365

@MarekPikula

Description

@MarekPikula

When using Buildah in CI pipelines with cached layers stored in the same registry as the target image, there are often cases where the resulting image is identical to a previously built one (no changes in layers).

In such cases, Buildah currently:

  1. Pulls all cache layers from the registry.
  2. Pushes them back unchanged (effectively no-op, since the layers are already present).

This behavior results in unnecessary time and bandwidth consumption, especially for large images.

Example CI job demonstrating this behavior: https://gitlab.freedesktop.org/MarekPikula/ci-multiplatform/-/jobs/83769470

Proposed improvement:

It would be highly beneficial if Buildah could detect this scenario and skip pulling/pushing unchanged layers, instead simply tagging the existing image in the registry. This seems to be the behavior of docker buildx, and bringing a similar optimization to Buildah would significantly speed up CI workflows and reduce network usage.

I saw this briefly mentioned in #3382, but I don’t think the specific use case of skipping redundant pull/push cycles for unchanged images has been fully addressed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions