Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repository name regex is outdated [docs]. #17

Open
ipanova opened this issue Dec 20, 2017 · 7 comments
Open

Repository name regex is outdated [docs]. #17

ipanova opened this issue Dec 20, 2017 · 7 comments
Labels
documentation Improvements or additions to documentation

Comments

@ipanova
Copy link

ipanova commented Dec 20, 2017

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

@ipanova ipanova changed the title Repository name regex is outdated. Repository name regex is outdated [docs]. Dec 20, 2017
@dmp42 dmp42 added the documentation Improvements or additions to documentation label May 26, 2018
@rahul3002
Copy link

i would like too fix this issue

@milosgajdos
Copy link
Member

@rahul3002 do you want to open a PR that fixes this?

@rahul3002
Copy link

yes i want to open

@milosgajdos
Copy link
Member

Please, be our guest -- we welcome contributions :)

@thaJeztah
Copy link
Member

Before we change; please double check if the regex in code matches the actual specification; in case there's a bug in the code; https://github.com/opencontainers/distribution-spec/blob/main/spec.md#pulling-manifests

@rahul3002
Copy link

sure will check it, I'm working on it

@rahul3002
Copy link

I'm unable to understand what kind of regex u want to update In it

@milosgajdos milosgajdos transferred this issue from distribution/distribution Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

5 participants