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

オープン
#14,460 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@gzm0 がすでに取り組んでいます。

2026年11月5日 から。

  • #14466 @gzm0 による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
docker, go
領域
backend, devops

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Go
スター
38.9k
フォーク
6k
平均マージ
2日 22時間
マージ済み PR(30日)
81

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

docker/compose のほかの issue

docker/compose の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。