Closed rogpeppe closed 1 year ago
I'm not sure when it happened, but it looks like we've relaxed the restrictions from the Docker spec:
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]+)*
.
As pointed out by @andaaron in #425, the regular expression proposed there was bogus. It was actually wrong in two different ways. Mea culpa, my apologies.
This fixes it. I wrote a few test cases to check: https://go.dev/play/p/4_iYH4Hao1-
Ideally something like the above would be committed for CI testing but perhaps that's a stage too far.