Script for Checking Docker Hub Version
Closed this issue · 1 comments
Interacting with the Docker Hub API is fairly annoying, but it's a fairly common need to want to do something like checking the "latest" version (via the hash) before pulling again.
User @mcuma posted this question sometime last night, and I shared the basic commands to use bash to request a token and then get the digest for a container, and he wrote a beautiful script!
I'd like to suggest adding this (even as a link?) somewhere to the user docs - maybe in places where you are introducing pulling via Docker Hub, and then you can suggest to the user to check to see if they need to do the pull at all.
Here is the full discussion, for posterity. https://groups.google.com/a/lbl.gov/forum/#!topic/singularity/eFmtqyRz5Tw
I don't think we want to link to this as-is, due to the fragility of tracking the digest in a separate digest.txt
, and possible confusing issues around the locking contlock
handling if the pull is interrupted.
The caching we have will prevent the duplicate pull of layers, but admittedly not a repeated SIF build. I think if we want to recommend something beyond that we need to have a solution which uses singularity inspect
and metadata in the container/sif.