oci: do not round-trip to registry when a pinned manifest is available locally

Offen
#14,460 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@gzm0 arbeitet bereits daran.

Seit 05.11.2026.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
68/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
docker, go
Bereich
backend, devops

Rechercherichtung

Start with the OCI resolver in pkg/remote/oci.go, especially the manifest retrieval and cache checks linked in the issue. Trace how digest-pinned references are resolved and how the cache indicates a locally available manifest. Done means a cached manifest for a digested reference avoids registry access while uncached references still resolve normally; add or run focused resolver tests for both cases.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

kind/feature status/0-triage
Description

Currently, the oci resolver always retrieves the OCI manifest:

https://github.com/docker/compose/blob/fed7345dba61c585ee70c795067a1a81c5d32615/pkg/remote/oci.go#L162

However, if the local cache has the digest of the manifest, no further pulling is required (as expected):

https://github.com/docker/compose/blob/fed7345dba61c585ee70c795067a1a81c5d32615/pkg/remote/oci.go#L172-L175

I'd like to short-circuit this for digested references: If the reference has a digest and the digest is available in the cache, do not talk to the registry at all.

The primary use case is operational safety in case of registry failure:
This feature will allow to still work with a compose config that includes: oci:// if it has been pulled before.

It is worth pointing out that this aligns the behavior with docker itself: images are kept locally, so it is not necessary for the registry to be up to, say, recreate an existing container with a modified environment.

Vorherrschende Sprache
Go
Sterne
38.9k
Forks
6k
Ø Merge
2 T. 22 Std.
Gemergte PRs (30 T.)
81

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus docker/compose

Alle Issues in docker/compose

Ähnliche Issues

Weitere Issues zu Go

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.