Skip to content

[docker] --image localhost:5000/nextstrain/base:latest fails with ValueError #560

Open

Description

@victorlin

Current Behavior

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).

Here is a copy of #559 (review):

[@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

  1. added
    bug
    on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions