Some blatherings by Keith Ball

View my projects on GitHub

How to query a remote docker registry

09 Oct 2016

If you are having problems with kubernetes reporting ErrImageNotFound when pulling an image, you can eliminate the obvious by checking the registry in the following way.

Do a docker login:

docker login -u {USERNAME} -p {PASSWORD} {REGISTRY}

Get your docker authentication token. Take the value for your registry url:

cat ~/.docker/config.json

Do some curl operations.

List catalog:

curl -X GET -H "Authorization: Basic {YOURTOKEN}" "https://{REGISTRY}/v2/_catalog"

List tags on an image:

curl -X GET -H "Authorization: Basic {YOURTOKEN}" "https://{REGISTRY}/v2/{IMAGENAME}/tags/list"