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
enhancement: allow +
in tag names
#16304
Comments
/cc @stevvooe |
My concern with the "+" character is its overloading for "space" in URLs, which is commonly used in registry APIs. This is a massive risk, so without a close study, the default answer would have to be "no". That said, I do see the need for compatibility with semantic versioning, albeit, the specification is pretty clear that this is only metadata:
I am not sure if this change is worth the risk or effort it requires. |
FWIW, as context for this request, we use the metadata in our image builds to mark the base image version the image was built against. For example "2.5.3+base.1.2.1". This is because we need to be able to rebuild old software versions against new base images without any code changes to the repository. Our current workaround is simply to do I do see the concerns as valid (even though "+" is "space" in query strings only) and don't really have a solid opinion one way or the another. |
If only the world were so simple. If you're willing to do the footwork of ensuring that the existing registry implementations and docker daemons will be compatible, we may be able to consider this. |
I am willing to do the footwork, but first I'd like to get some confirmation that this feature is desired by atleast somebody other than us - there's no point in adding the "+" there if nobody is going to use it. |
@nakedible-p You've found your match: distribution/distribution#1202 ;) |
@stevvooe Do you think it's still worth to research? It was almost a year. |
@LK4D4 This is pending some due diligence on using these in urls. We can merge distribution/distribution#1202 once this is done. |
Will be good to have ability to use pluses to stay close with Python PEP 440 https://www.python.org/dev/peps/pep-0440/#local-version-identifiers |
@lorddaedra No one is disagreeing that this might be useful in certain cases. Here is the list of requirements for getting this through: distribution/distribution#1202 (comment). If someone is willing to do the due diligence and testing, please let me know. |
This should be discussed in OCI Distribution Spec repo if there is still demand for this: https://github.com/opencontainers/distribution-spec |
There is now a ticket for this in the OCI Distribution Spec here: opencontainers/distribution-spec#154 |
Docker tags do not support "+" as part of their name [1], so turn e.g. "3.0.1-SNAPSHOT+003.sha.cc0865e" into "3.0.1-003.sha.cc0865e" by using the build part as the pre-release part. SemVer sorting rules [2] are still so that 3.0.1-003.sha.cc0865e < 3.0.1. [1]: moby/moby#16304 [2]: https://semver.org/#spec-item-11 Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Docker tags do not support "+" as part of their name [1], so turn e.g. "3.0.1-SNAPSHOT+003.sha.cc0865e" into "3.0.1-003.sha.cc0865e" by using the build part as the pre-release part. SemVer sorting rules [2] are still so that 3.0.1-003.sha.cc0865e < 3.0.1. [1]: moby/moby#16304 [2]: https://semver.org/#spec-item-11 Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Docker tags do not support "+" as part of their name [1], so turn e.g. "3.0.1-SNAPSHOT+003.sha.cc0865e" into "3.0.1-003.sha.cc0865e" by using the build part as the pre-release part. SemVer sorting rules [2] are still so that 3.0.1-003.sha.cc0865e < 3.0.1. [1]: moby/moby#16304 [2]: https://semver.org/#spec-item-11 Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Currently tags must satisfy the regexp
^[\w][\w.-]{0,127}$
. That means that tags allow_
,.
and-
apart from letters and numbers.Semantic Versioning is quite a common versioning system today, used in NPM and in increasing numbers in other projects, including Docker itself. Semantic Versioning 2.0.0 says:
This means that Semantic Versioning version numbers can in full represented by Docker tags, with the exception of the plus sign. Adding the plus sign as an allowed character in tags would allow all semantic versions to be directly used as docker tags.
It is obvious that there are a lot of competing versioning schemes and there are probably a lot of other characters that would be required for some of them as well, so the addition of just the plus sign is probably a judgement call.
However, I wanted to suggest this because of the widespread usage of semantic versioning and let the project make the judgement call.
The text was updated successfully, but these errors were encountered: