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

Ouverte
#14,460 3 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@gzm0 y travaille déjà.

Depuis le 5/11/2026.

  • #14466 par @gzm0 — ouverte

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
68/100
Type d'issue
Fonctionnalité
Clarté
Clairement spécifiée
Activité
Active
Stack technique
docker, go
Domaine
backend, devops

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
Go
Étoiles
38.9k
Forks
6k
Merge moyen
2 j 22 h
PR mergées (30 j)
81

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de docker/compose

Toutes les issues de docker/compose

Issues similaires

Plus d'issues Go

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.