mozilla-services / autograph

Mozilla's digital signature service
https://hub.docker.com/r/mozilla/autograph/
Mozilla Public License 2.0
152 stars 33 forks source link

use crane to exactly copy our image during deploy #1050

Closed jmhodges closed 1 month ago

jmhodges commented 1 month ago

The new docker tag and docker push calls were creating new manifests for the images with mismatched digest values. Those new manifests were of the application/vnd.docker.distribution.manifest.v2+json type, while our AWS-specific image verification code was expecting application/vnd.oci.image.manifest.v1+json and the sha256 digests in the manifest for the newly tagged images, because of this change, would no longer match.

So, we attempts to fix both problems by using crane to exactly copy the docker image from one tag to another. See https://github.com/google/go-containerregistry/blob/main/cmd/crane/README.md for more information on crane.