Skip to content

Repository name regex is outdated [docs]. #17

Open
@ipanova

Description

@ipanova

Please update the regex mentioned in docs because it is outdated.
https://docs.docker.com/registry/spec/api/#overview

A repository name is broken up into path components. A component of a repository name must be at least one lowercase, alpha-numeric characters, optionally separated by periods, dashes or underscores. More strictly, it must match the regular expression [a-z0-9]+(?:[._-][a-z0-9]+)*.

Now multiple dashes and double underscore is allowed.
https://github.com/docker/distribution/blob/master/reference/regexp.go#L18

I used the go playground which gave me as an output this regex [a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?

https://play.golang.org/p/wQ4w431jvS

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions