Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Docker image with a registry port cannot be parsed

Aberta
#669 0 comentários 0 reações 0 responsáveis Ver no GitHub

@Amadeus-22 já está trabalhando nisso.

Desde 6/10/2026.

  • #670 de @Amadeus-22 — aberto

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
45/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
python
Domínio
cli

Direção de pesquisa

Start at DockerImage.parse in lean/models/docker.py and reproduce the two failing cases from the issue. The rule is to treat only a final colon segment without / as the tag; add cases covering registry ports and tags to the existing DockerImage parse tests (look under tests/) so both parse and error paths are covered. Note that linked PR #670 is already open against this issue, so confirm with maintainers before starting.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Expected Behavior

An image hosted on a registry that listens on a port, for example localhost:5000/lean or registry.example.com:5000/quantconnect/lean:123, can be used with --image and with lean config set engine-image / research-image.

Actual Behavior

DockerImage.parse splits on every colon, so the registry port is read as the tag:

localhost:5000/lean          -> DockerImage(name='localhost', tag='5000/lean')
localhost:5000/lean:latest   -> ValueError: too many values to unpack (expected 2)
Potential Solution

Only treat what follows the last colon as the tag, and only when it does not contain a /. I can open a PR with the fix and tests.

Reproducing the Problem
from lean.models.docker import DockerImage
DockerImage.parse("localhost:5000/lean")
DockerImage.parse("localhost:5000/lean:latest")
System Information

lean-cli master at 20e58aa, Python 3.13, Linux.

Checklist
  • I have completely filled out this template
  • I have confirmed that this issue exists on the current master branch
  • I have confirmed that this is not a duplicate issue by searching issues
Linguagem predominante
Python
Estrelas
327
Forks
169
Métricas de merge de PRs
Nenhum PR com merge em 30d

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de QuantConnect/lean-cli

Todas as issues de QuantConnect/lean-cli

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.