1

If I do

docker pull somethinga/somethingb:sometag

how exactly do I know if I'm pulling image somethingb:sometag from a registry hosted at somethinga or if I'm pulling image somethinga/somethingb:sometag from docker hub?

I noticed that, currently at least, dockerhub only seems to allow docker ids that "Use 4 to 30 letters & digits only." So gcr.io/blah:blah doesn't seem like it's going to get interpreted as an image from Docker Hub.

But what's the actual procedure? Does the docker pull command try to use somethinga as the hostname and then fall back to checking Docker Hub? Or is it the otherway around?

Is this actually specified somewhere?

Benjamin Berman
  • 521
  • 4
  • 15
  • I think the linked question covers it. But since I'm both the one that asked and answered it, let me know if your question is different and I can reopen. – BMitch Apr 11 '22 at 20:55
  • @BMitch That pretty much covers it. The one bit I didn’t see in your answer is if the docker code can be considered specification—could this unexpectedly change in some subtle way in the future? – Benjamin Berman Apr 12 '22 at 01:54
  • 1
    Good observation. The reference syntax hasn't been defined by OCI, so it's just been the community following Docker's lead for compatibility. That said, `distribution/distribution` was donated to the CNCF, so that implementation decision kinda went with it. – BMitch Apr 12 '22 at 09:09

0 Answers0