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 }}
Repository navigation
[docker] --image localhost:5000/nextstrain/base:latest fails with ValueError #560
The local Docker registry localhost:5000 is used for debugging with docker-base. The following error appears when trying to use a tagged image from the local registry:
$ nextstrain shell --docker --image localhost:5000/nextstrain/base:latest .
…
Traceback (most recent call last):
File "runpy", line 196, in _run_module_as_main
File "runpy", line 86, in _run_code
File "nextstrain.cli.__main__", line 43, in <module>
File "nextstrain.cli.__main__", line 19, in main
File "nextstrain.cli", line 36, in run
File "nextstrain.cli.command.shell", line 106, in run
File "nextstrain.cli.runner", line 263, in run
File "nextstrain.cli.runner.docker", line 149, in run
File "nextstrain.cli.runner.docker", line 463, in image_supports
File "nextstrain.cli.util", line 639, in split_image_name
ValueError: too many values to unpack (expected 2)
Scope: any command that takes --image: build, run, view, shell
Possible solution
Update split_image_name to handle local registry.
Additional context
This bug was first mentioned in PR #559 by the GitHub account Qrytics. That PR is no longer visible because the account was removed (as noted in another open-source project).
[@victorlin] Thanks for reporting. I have noticed the bug in certain situations such as nextstrain shell --image localhost:5000/nextstrain/base:latest. A workaround is to drop :latest, but that's tag-specific and actually goes the wrong path in split_image_name() with repository=localhost and tag=5000/nextstrain/base. It doesn't end up mattering much because the function is only called while checking whether the image supports /nextstrain/env.d. The new behavior is an improvement.
Activity