google / containerregistry

A set of Python libraries and tools for interacting with a Docker Registry.
https://gcr.io
Apache License 2.0
204 stars 116 forks source link

fast_puller_.py pulls the wrong image from GCR #145

Closed alex1545 closed 5 years ago

alex1545 commented 5 years ago

I'm using the fast puller to pull an image from GCR, but according to the SHA256 in the digest file, it pulls the wrong image.

I used the fast puller as

$ python puller.par --name gcr.io/google-containers/debian-iptables@sha256:cd81b1a8f40149b5061735927d2a2cf4b90fc27a52fc4cc66889b373368b6ef6 --directory .

and

$ python puller.par --name gcr.io/google-containers/debian-iptables:v11.0 --directory .

This failure seems to occur for the tagged images in the same repository, where it ends up pulling the oldest image that was pushed on the same day. For both commands the digest file contains sha256:d4ff8136b9037694a3165a7fff6a91e7fc828741b8ea1eda226d4d9ea5d23abb

jonjohnsonjr commented 5 years ago

You're pulling a manifest list, which is being resolved to an image.

If you look here you'll see that v11.0 points to sha256:d4ff8136b9037694a3165a7fff6a91e7fc828741b8ea1eda226d4d9ea5d23abb for amd64/linux.

alex1545 commented 5 years ago

Thank you for the explanation.