47. Caching for container base images used during builds

Date: 2025-06-22

Status

Implementable

Context

Konflux builds container images using tools like Buildah. During the build process, base images are fetched from container registries like quay.io. This repeated fetching of the same images results in high network traffic, slower build times, and exposes builds to failures caused by network issues or registry rate-limiting. This negatively impacts both the user experience (in terms of build speed and reliability) and operational costs of running the platform.

Decision

We will implement a caching layer for container base images used during the build process using Squid HTTP proxies to mitigate these issues.

Rationale

Squid was chosen as the caching proxy for several reasons:

Implementation Details

Alternatives Considered

Several alternatives to using a Squid proxy were considered:

The chosen Squid-based approach was preferred because it is more transparent. Clients continue to reference images by their canonical names (e.g., quay.io/namespace/image:tag), and the proxy transparently caches the underlying layer blobs without requiring any changes to image names or build definitions. This provides the benefits of caching with minimal impact on the user workflow.

Consequences