check image on dockerhub.com
kmille opened this issue · 6 comments
Hey,
I want to know if there is a new version of the official ubuntu focal image. I can't get it to work. The docs are very minimalistic. I tried to play with some endpoints, but without success.
my test configuration:
[docker-ubuntu]
source = "container"
registry = "hub.docker.com"
container = "kmille2/deezer-downloader"
If I run it with the current master branch:
nvchecker@ovh:~/nvchecker/nvchecker$ /home/nvchecker/nvchecker/venv/bin/nvchecker
[E 05-21 16:37:07.848 core:326] docker-ubuntu: unexpected error happened error=HTTPError(404, 'Not Found', HTTPResponse(_body=None,_error_is_response_code=True,buffer=<_io.BytesIO object at 0x7f0e196d2258>,code=404,effective_url='https://hub.docker.com/v2/',error=HTTP 404: Not Found,headers=<tornado.httputil.HTTPHeaders object at 0x7f0e196cef60>,reason='Not Found',request=<tornado.httpclient.HTTPRequest object at 0x7f0e196bc160>,request_time=0.6425895690917969,start_time=1621607827.2053936,time_info={'queue': 2.0742416381835938e-05, 'namelookup': 0.159526, 'connect': 0.253579, 'appconnect': 0.445031, 'pretransfer': 0.445111, 'starttransfer': 0.546772, 'total': 0.641322, 'redirect': 0.0}))
Traceback (most recent call last):
File "/home/nvchecker/nvchecker/venv/lib/python3.7/site-packages/nvchecker/util.py", line 233, in run_one
keymanager = self.keymanager,
File "/home/nvchecker/nvchecker/venv/lib/python3.7/site-packages/nvchecker_source/container.py", line 80, in get_version
auth_info = await cache.get(registry_host, get_registry_auth_info)
File "/home/nvchecker/nvchecker/venv/lib/python3.7/site-packages/nvchecker/util.py", line 177, in get
r = await fu
File "/home/nvchecker/nvchecker/venv/lib/python3.7/site-packages/nvchecker_source/container.py", line 40, in get_registry_auth_info
await session.get(f'https://{registry_host}/v2/')
File "/home/nvchecker/nvchecker/venv/lib/python3.7/site-packages/nvchecker/httpclient/base.py", line 37, in get
method='GET', *args, **kwargs)
File "/home/nvchecker/nvchecker/venv/lib/python3.7/site-packages/nvchecker/httpclient/base.py", line 66, in request
proxy = p or None,
File "/home/nvchecker/nvchecker/venv/lib/python3.7/site-packages/nvchecker/httpclient/tornado_httpclient.py", line 84, in request_impl
res.code, res.reason, res
nvchecker.httpclient.base.HTTPError: (404, 'Not Found', HTTPResponse(_body=None,_error_is_response_code=True,buffer=<_io.BytesIO object at 0x7f0e196d2258>,code=404,effective_url='https://hub.docker.com/v2/',error=HTTP 404: Not Found,headers=<tornado.httputil.HTTPHeaders object at 0x7f0e196cef60>,reason='Not Found',request=<tornado.httpclient.HTTPRequest object at 0x7f0e196bc160>,request_time=0.6425895690917969,start_time=1621607827.2053936,time_info={'queue': 2.0742416381835938e-05, 'namelookup': 0.159526, 'connect': 0.253579, 'appconnect': 0.445031, 'pretransfer': 0.445111, 'starttransfer': 0.546772, 'total': 0.641322, 'redirect': 0.0}))
nvchecker@ovh:~/nvchecker/nvchecker$
This is my example image: https://hub.docker.com/r/kmille2/deezer-downloader
Does it only work with docker.io? I don't even know whats the difference.
Thanks you.
@yan12125 what do you think? hub.docker.com seems to have different APIs than docker.io. curl
ing https://hub.docker.com/v2/repositories/kmille2/deezer-downloader/ directly works.
FWIW, this works:
[docker-ubuntu]
source = "container"
registry = "docker.io"
container = "kmille2/deezer-downloader"
hub.docker.com seems to have different APIs than docker.io
Yep, currently nvchecker only supports the registry API used by docker.io
. It is possible to also support Docker Hub APIs, but I'm lazy to implement it 😆. Anyway, I think a container listed on Docker Hub is also available via docker.io. How about improving the documentation like this?
registry
and container
are the host and the path used in the pull command. Note that the docker
command allows omitting some parts of the container name while this plugin requires the full name. If the host part is omitted, use docker.io
, and if there is no slash in the path, prepend library/
to the path. Here are some examples:
Pull command | registry | container |
---|---|---|
docker pull quay.io/prometheus/node-exporter | quay.io | prometheus/node-exporter |
docker pull nvidia/cuda | docker.io | nvidia/cuda |
docker pull python | docker.io | library/python |
I see. The configuration
[docker-ubuntu]
source = "container"
registry = "docker.io"
container = "library/ubuntu"
gives me:
[I 05-23 10:30:10.843 core:349] docker-ubuntu: updated to 21.04
Is there a way to check if there is a new stable focal release? The most up-to-date is focal-20210416 right now.
The global option include_regex
is useful :) For example,
[docker-ubuntu]
source = "container"
registry = "docker.io"
container = "library/ubuntu"
include_regex = "focal-.*"
perfect! Thanks for your help!
I've updated the doc.