docker / docker/docker-py

Image tag correction check is incorrect - "invalid reference format"

Open
#3,223 2 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.2k
Forks
1.7k
Avg merge
13d 8h
Merged PRs (30d)
2

Description

When building an image with a tag such as "registry-host:5000/myname/myimage" (see example in https://docs.docker.com/engine/reference/commandline/image_push/, the name is mistakenly identified as illegal, yielding an "invalid reference format" error.
This seems to stem from an incorrect regular expression in the docker/utils/build.py definition of _TAG which is called by the function match_tag.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in docker/utils/build.py by reading the _TAG definition and the match_tag function, then reproduce the reported case with the registry-host:5000/myname/myimage tag. Done means that this valid Docker image reference is accepted without an invalid reference format error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
devops
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.