-
Notifications
You must be signed in to change notification settings - Fork 644
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
Lowercase repository names (+ warnings if happens) #423
Comments
As far as I can tell, a Hyphen (the character produced by pressing the key to the right of the "0" key on the top row of a standard US keyboard; unicode This character is frequently erroneously referred to as a "dash." Hyphens are the standard separator between Maven version numbers and their qualifiers. Please do not update the docker-maven-plugin to begin translating valid characters in tag names into other characters. Hyphens in Tags
Hypens in Image Names
This Doesn't Even Fix ItI cloned the "reproduction" listed in #419 and changed all of the hypens My environment: maven
docker
d-m-p
But Please Sanitize Correctly_I do not think hyphens, a valid character in both Docker tags and Docker image names, were the cause of issue #419. Please do not remove our ability to use this character in tags and image names with the docker-maven-plugin._ But sanitization would still be a good idea - though IMO the d-m-p should absolutely print a warning (or perhaps even fail unless sanitization is optionally enabled) if it is changing the output from what the user specified, to something else. Have I grievously misunderstood what's going on here? |
Thanks for the clarification. So I'm not really sure what is going on in #419. That's what I have in server log when I use a
But you are right, I get the same with So I'm still puzzled, the docker daemon used is 1.10.1 |
I guess its because of the username which needs to match |
nope, that's not. still puzzled, will reopen #419 |
Its that no capital letters are allowed. Strange, didn't know that. What do you think, should we automatically lowercase stuff (+printing a warning) or break with an error ? |
See also docker/compose#1416 |
My personal preference would be the following strategy towards sanitization:
The overarching theme here is that the software shouldn't do something different than from what the user asked and call it a success. If a user instruments the plugin to push the |
Ok, so maybe we simply start with the error and add the |
:+1 ! |
Could be that validation needs to be performed at various places. Alternatively: Switch to ImageName everywhere instead of plain strings.
Add the validation as described in https://github.com/docker/docker/blob/master/vendor/src/github.com/docker/distribution/reference/reference.go and implemented in https://github.com/docker/docker/blob/master/vendor/src/github.com/docker/distribution/reference/regexp.go + adapted unit tests from https://github.com/docker/docker/blob/f38610df1f0b4a28523a524a809c4392788ade5d/integration-cli/docker_cli_tag_test.go Also, still allow uppercase hostnames a fixed in moby/moby#20175. |
* Added property handler support * Added documentation * Changed from Properties to Map<String, String> since this fits better for the property handler * Added a test
Its not the tag but the name which needs to be sanitized. See comments below.
When tags are given, either as part of the image name or as extra tag, they should be sanitized to conform to the Docker syntax. I.e. no hyphens
-
are allowed and they should be translated to e.g._
.Alternatively throw an error early. Currently the error message is quite confusing.
See #419 for an example.
The text was updated successfully, but these errors were encountered: