NERSC / shifter

Shifter - Linux Containers for HPC
Other
348 stars 63 forks source link

Shifter pull by digest #299

Closed vsoch closed 2 years ago

vsoch commented 3 years ago

Hi! I'm hoping that shifter is able to pull by a digest (and not just a tag)? E.g., one of these I'm wanting to work:

shifterimg pull docker:python:sha256:921882e92036ab2d17280e5744e8a9ababf12184b04afda357abf68f0da45896
2021-06-24T15:03:36 Pulling Image: docker:python:sha256:921882e92036ab2d17280e5744e8a9ababf12184b04afda357abf68f0da45896, status: FAILURE

shifterimg pull docker:python@sha256:921882e92036ab2d17280e5744e8a9ababf12184b04afda357abf68f0da45896
2021-06-24T15:03:43 Pulling Image: docker:pythonsha256:921882e92036ab2d17280e5744e8a9ababf12184b04afda357abf68f0da45896, status: FAILURE

Is there any reason it's not allowed or could it be supported?

scanon commented 3 years ago

@vsoch It isn't currently supported but it could be added. Right now if there is a tag associated with the image then the ID used by Shifter is effectively the digest so it can be referenced after it is pulled. But you can't currently pull by the digest to start. I think the main change would be to adjust the parsing to recognize the hash. I also need to see if it would cause any issues with how things are stored in Mongo. I'll make this a feature request and see if it can be added.

vsoch commented 3 years ago

Fantastic! Yes ideally we pull based on digest for shpc so it's a specific container (and not a moving target).

scanon commented 2 years ago

This is now (well since last year) supported.

vsoch commented 2 years ago

woot! I'll put this on my TODO to try out soon.