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

未关闭
#14,460 3 条评论 0 个 reaction 已指派 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 小时
30 天内合并 PR
81

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

docker/compose 的其他 Issue

查看 docker/compose 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。