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

Removed restriction that port mappings are integers to support UDP #610

Merged
merged 1 commit into from
Nov 17, 2016

Conversation

tmckeag
Copy link
Contributor

@tmckeag tmckeag commented Nov 3, 2016

Hi @rhuss, sorry for the confusion, I've been out awhile with pneumonia. Finally got back to this, and my branch was far enough behind (and I apologize I'm kind of a Git newb) I thought it would be easier to apply to a fresh fork.

Your original link for committing guidelines doesn't work anymore, so I don't think I got everything right, other than correcting the author on the commit. Let me know if I need to do anything else.

@rhuss
Copy link
Collaborator

rhuss commented Nov 11, 2016

No problem, hope you are fine again !

Thanks a lot for your revised PR, looks good to me. The link for the contribution guidelines is here https://github.com/fabric8io/docker-maven-plugin/blob/master/CONTRIBUTING.md

Actually the only thing you would need to do is a 'git commit -s --amend' on your master tree (if this is still your last commit) and then a 'git push --force' to update the PR.

After this we can merge it into trunk.

Signed-off-by: Tory McKeag <tory.mckeag@gmail.com>
// First group is the port mapping.
// It may be split with a : in a variety of ways.
String mapping = matcher.group(1);
String[] mappingParts = mapping.split(":", 3);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just re-looked at this PR and I think that is not correct here as we are talking about the ports to expose in a Dockerfile and not about mappings. So there must not be a : inlcude in the specificiation and only 8080 and 8080/tcp should be allowed.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't mind I'd fix this now, since I have to make a release right now.

}
DockerFileKeyword.EXPOSE.addTo(b, portsS);
}
}

// Pattern for splitting of the protocol part of the port.
private static final Pattern PROTOCOL_SPLIT_PATTERN = Pattern.compile("(.*?)(?:/(tcp|udp))?$");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guess we can match case insensitive here, and do a lowercase when adding them to the port list. makes it a bit more flexible for users.

@rhuss rhuss merged commit 745556c into fabric8io:master Nov 17, 2016
rhuss added a commit that referenced this pull request Nov 17, 2016
Signed-off-by: Roland Huß <roland@ro14nd.de>
rhuss added a commit that referenced this pull request Nov 17, 2016
See also #610

Signed-off-by: Roland Huß <roland@ro14nd.de>
rhuss added a commit that referenced this pull request Dec 17, 2016
Signed-off-by: Roland Huß <roland@ro14nd.de>
rhuss added a commit that referenced this pull request Dec 17, 2016
See also #610

Signed-off-by: Roland Huß <roland@ro14nd.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants