Skip to content

Conversation

@lsm5
Copy link
Member

@lsm5 lsm5 commented Dec 10, 2025

See individual commits.

Vendors containers/container-libs#552

lsm5 added 3 commits December 10, 2025 14:52
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
This commit adds support for the --force-digest flag to skopeo copy,
which allows users to force the use of a specific digest algorithm
(sha256, sha512) when copying images.

Changes:
- cmd/skopeo/copy.go: Parse --force-digest flag and set digest options

Example usage:
  skopeo copy --force-digest=sha512 docker://alpine dir:/path/to/dest

This will copy the image and recompute all digests using sha512, even if
the source image uses sha256.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
@lsm5 lsm5 changed the title cmd/skopeo/copy: New --force-digest flag [sha512] cmd/skopeo/copy: New --force-digest flag Dec 10, 2025
Copy link
Contributor

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would follow containers/container-libs#552 WRT option naming / timing / stability.


(IIRC there are tests that validate man pages vs. --help output; so splitting the feature addition and a man page update results in a commit that doesn’t pass — it would be better to squash that into one. Admittedly running git bisect on Skopeo is probably very rare.)

additionalTags []string // For docker-archive: destinations, in addition to the name:tag specified as destination, also add these
signIdentity string // Identity of the signed image, must be a fully specified docker reference
digestFile string // Write digest to this file
forceDigest string // Force a specific digest algorithm (sha256, sha384, or sha512)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would probably be better placed in sharedCopyOptions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants