Is there a way to find the age of a Docker image pushed to AWS ECR?
When I ask for the image manifest with aws ecr batch-get-image --repository some/repo --image-ids "imageDigest=sha256:abcdef..."
then it returns the AWS reply with the embedded manifest. Sample output
{
"images": [
{
"registryId": "1234",
"imageId": {
"imageDigest": "sha256:abcdef...",
"imageTag": "latest"
}
},
"imageManifest": "<serialised JSON I'll paste below>"
"repositoryName": "some/repo"
}
],
"failures": []
}
and the serialised JSON embedded in the AWS response looks along these lines:
{
"schemaVersion": 2,
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"config": {
"mediaType": "application/vnd.docker.container.image.v1+json",
"size": 123456,
"digest": "sha256:38f08cc551925935e235c5c94ab3fb89568bd286e3335aa2e05d7bd3ceee4574"
},
"layers": [
{
"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
"size": 573764,
"digest": "sha256:06dde66f337b57adcfca48b87d126b99a249765ccf2e09964584befc2890ae79"
}
]
}
there is no metadata that I can see indicating when this image was pushed to ECR.