Skip to content

7.0: Docker Tag Parsing Issue with Registry Ports #3195

@bbezak

Description

@bbezak

Description:

We're facing a parsing issue in docker.py version 7.0, where registry server addresses with port numbers are incorrectly processed as part of the Docker tag, leading to an invalid tag format error.

Error:

it' happening in openstack kolla upstream CI:
docker.errors.DockerException: invalid tag 'primary:4000/lokolla/base:change_903165': invalid reference format

Possible issue:

The current regex introduced in commit: a9b5494
in docker.py does not accommodate port numbers in registry addresses:

_TAG = re.compile(
    r"^[a-z0-9]+((\.|_|__|-+)[a-z0-9]+)*(\/[a-z0-9]+((\.|_|__|-+)[a-z0-9]+)*)*" \
    + "(:[a-zA-Z0-9_][a-zA-Z0-9._-]{0,127})?$"
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions