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

Đang mở
#14,460 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@gzm0 đang làm issue này rồi.

Từ ngày 5/11/2026.

  • #14466 của @gzm0 — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
docker, go
Lĩnh vực
backend, devops

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Go
Star
38.9k
Fork
6k
Merge trung bình
2 ngày 22 giờ
Pull request đã merge (30 ngày)
81

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của docker/compose

Tất cả issue của docker/compose

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.