I'm trying to reproduce the hash produced by docker images --digests myself.
I've tried running docker save -o image.tar <image> extracting it and running cat metadata.json | shasum -a 256 (and a few variants, like piping through jq or trimming it) but haven't been able to match the hash that docker gives me.
Should what I'm trying work, or is there another mechanism I can use?