Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Docker push: ability to get the digest

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

Chưa có ai nhận issue này.

Đá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
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
docker, go
Lĩnh vực
cli

Hướng nghiên cứu

Bắt đầu bằng cách lần theo điểm vào của docker push --quiet và so sánh nó với đầu ra push thông thường, trong đó có image digest. Xác định kết quả digest dự kiến ở chế độ quiet, sau đó bổ sung coverage cho thấy các push cung cấp digest mà không yêu cầu capture và lọc đầu ra.

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

As part of attestation and security, I would like to push an image and immediately get the sha256 digest.

When I push the image with docker push <tag> the digest is shown:

The push refers to repository [kristofmattei/foobar:my-awesome-tag]
da39f46fb7a8: Waiting
da39f46fb7a8: Layer already exists
...
4f4fb700ef54: Waiting
4f4fb700ef54: Layer already exists
my-awesome-tag: digest: sha256:d67fed5e2a846838ace975a96fd1a53e3fbe7fe60d95a8019e3003c295643a07 size: 1043

But using --quiet the the digest itself disappears too:

kristofmattei/foobar:my-awesome-tag

Once this is done I can do docker image inspect kristofmattei/foobar:my-awesome-tag to get the digest.

However I might be pushing multiple images, and in order to avoid any bugs when I accidentally push 2 images with the same tags but different digests, I'd like to get the digest directly from the push (both digests are valid, for example in the case of multi-platform images).

That way I can merge the images together later.

Is there another way to get the digest from the push, other than capture & filter the output?

Ngôn ngữ chính
Go
Star
6.1k
Fork
2.2k
Merge trung bình
1 ngày 10 giờ
Pull request đã merge (30 ngày)
47

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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/cli

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

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.