-
Notifications
You must be signed in to change notification settings - Fork 132
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
Support docker version with build number #78
Comments
Hello, There are no plus signs used in the semver tool command line. There are, of course, plus signs used in some version strings: those with "build" parts. And there are hyphens sometimes. These are parts of the Semantic Version numbering standard. I doubt that we'd want to deviate from the standard. And, replacing a plus with a hyphen is sure to cause problems. But, maybe I don't understand. Again, please clarify. |
When you tag a docker image, the tag cannot include
so if I want to use
|
Thanks for the details. Your problem: Docker does not accept the plus sign in tags. A quick search around the web turns up this problem that you and others have: it is not possible (in cases where a "build" part is present) to use semantic version strings as tags. There are outstanding requests and submitted issues to Docker asking for a change. I have not looked into Docker responses, how long these requests have been around, etc. See this short discussion and workaround. One thing to notice is that some people argue that adding build numbers to tags is a bad idea. The workaround is to use the pre-release part to include build information. You could do this with the semver tool. I think this is a bad idea (covered in the above mentioned discussion). I do not think it is a good idea to change the semver tool so that it produces non-compliant semver strings! At present, semver never produces invalid strings and we should keep it this way. It seems what you want is a tool that produces Docker tags from input arguments: e.g. takes a semantic version string, a build number, maybe a git commit hash, ... and generates a Docker tag. Or better, a list of tags! It is common to tag the same image with multiple tags: major, major.minor, major.minor.patch, "latest". Start a project! |
You might want to look at an alternative to tags for build metadata.
Pointing users to specific builds is fraught with problems. Sometimes, however, it is useful to trace back to the specific build: usually faulty dependency management or broken distribution automation. Putting the info in the image is important because the problem may be broken tagging automation (or human error if you're not automated). If you are not publishing/releasing images, but instead just building snapshots, then using the pre-release workaround might make sense. E.g. |
Docker versions can't use
+
in tag, hencebuild
bump isn't available if you want to use semver in this case.Can we have any customization to make different build syntax? like
-
instead+
?The text was updated successfully, but these errors were encountered: