You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 28, 2022. It is now read-only.
Hi,
Excellent job on putting this library together :-)
I kept getting this error:
Traceback (most recent call last):
File "./dimgx.py", line 494, in <module>
_main()
File "/home/sithembiso/Projects/dimgx/_dimgx/cmd.py", line 272, in main
layers_dict = inspectlayers(dc, args.image)
File "/home/sithembiso/Projects/dimgx/dimgx.py", line 338, in inspectlayers
images = sorted(( normalizeimage(i) for i in images ), key=imagekey, reverse=True)
File "/home/sithembiso/Projects/dimgx/dimgx.py", line 338, in <genexpr>
images = sorted(( normalizeimage(i) for i in images ), key=imagekey, reverse=True)
File "/home/sithembiso/Projects/dimgx/dimgx.py", line 458, in normalizeimage
repo, tag = repo_tag.split(':')
ValueError: too many values to unpack
This was because one of the images I have on my docker images is tagged for a localhost registry. The name looks like this: localhost:5000/55893ae73513c315ba7c3000.
What would happen is that Dimgx would append :latest turning it to localhost:5000/55893ae73513c315ba7c3000:latest which is not expected according to #L458.
I solved this by adding the following because I don't care for that image:
if repo_tag.count(':') > 1:
continue
I wanted to do something and add a pull request, but I don't know what would be the best way to handle this. Should we try and make people use regular image names of try to handle these cases as well?
Thanks
The text was updated successfully, but these errors were encountered:
I'm embarrassed that hadn't considered your use case. 😳
However, I'm concerned that your proposed solution would break for something like localhost:5000/myimg:latest or localhost:5000/myimg:mytag though. It would also still be broken for something like localhost:5000/myimg. And never mind specifying a repo with an IPv6 address. 😮
What do you think about doing something like a regex instead? Maybe something like:
I just banged that out without checking it, so it may not even validate, much less work, but hopefully you get the idea? I'm sure there are improvements that could be made. For example, perhaps the [^:]+ in the img and tag groups could be more restrictive (and reflect Docker's own limitations)?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
Excellent job on putting this library together :-)
I kept getting this error:
This was because one of the images I have on my
docker images
is tagged for a localhost registry. The name looks like this:localhost:5000/55893ae73513c315ba7c3000
.What would happen is that Dimgx would append
:latest
turning it tolocalhost:5000/55893ae73513c315ba7c3000:latest
which is not expected according to #L458.I solved this by adding the following because I don't care for that image:
I wanted to do something and add a pull request, but I don't know what would be the best way to handle this. Should we try and make people use regular image names of try to handle these cases as well?
Thanks
The text was updated successfully, but these errors were encountered: