Open kniec opened 5 years ago
Just want to chime in here that I would really like this feature too! I just was really sad to realize that I can't pull a specific digest with sarus:
sarus pull python@sha256:02311d686cd35b0f838854d6035c679acde2767a4fd09904e65355fbd9780f8a
# image : index.docker.io/library/python@sha256:02311d686cd35b0f838854d6035c679acde2767a4fd09904e65355fbd9780f8a
# cache directory : "/home/vanessa/.sarus/cache"
# temp directory : "/tmp"
# images directory : "/home/vanessa/.sarus/images"
Failed to pull image 'index.docker.io/library/python@sha256:02311d686cd35b0f838854d6035c679acde2767a4fd09904e65355fbd9780f8a'
The image is not present in the remote registry.
Is it the case that it doesn't exist? It is not - the image is pullable with docker:
docker pull python@sha256:02311d686cd35b0f838854d6035c679acde2767a4fd09904e65355fbd9780f8a
docker.io/library/python@sha256:02311d686cd35b0f838854d6035c679acde2767a4fd09904e65355fbd9780f8a: Pulling from library/python
540db60ca938: Pull complete
d037ddac5dde: Pull complete
629719f9106a: Pull complete
f9ef3a05a91e: Pull complete
0faf4e7f2207: Pull complete
Digest: sha256:02311d686cd35b0f838854d6035c679acde2767a4fd09904e65355fbd9780f8a
Status: Downloaded newer image for python@sha256:02311d686cd35b0f838854d6035c679acde2767a4fd09904e65355fbd9780f8a
docker.io/library/python@sha256:02311d686cd35b0f838854d6035c679acde2767a4fd09904e65355fbd9780f8a
I'd like to add sarus to Singularity Registry HPC which will make sarus containers available via environment modules, but it will definitely fall short if I can't pull a specific digest.
Hi @vsoch, thanks for reporting this behavior. The error message is definitely misleading, likely due to the fact that Sarus currently cannot handle specific digest strings/identifiers.
There are plans for an overall update of the image pulling/management code, with the intent to add a number of user-requested features (pulling by digest is definitely one of these!) and overcome several limitations of the current implementation.
While it will take us a little longer to get there, in the short term we can look into making the error message less ambiguous when using digests.
Pulling an image based on a sha256 hash is not possible. I reckon it would benefit reproducibility to pull an image based on the RepoDigest:
Docker allows to download an image based on the digest:
Sarus is breaking when using a digest: