-
Notifications
You must be signed in to change notification settings - Fork 94
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
Fix getting hostname for HOST networking #25
Conversation
@@ -111,7 +111,9 @@ class ComposeUp extends DefaultTask { | |||
String gateway | |||
Map<String, Object> networkSettings = inspection.NetworkSettings | |||
Map<String, Object> networks = networkSettings.Networks | |||
if (networks) { | |||
if (networks && networks.every { it.key.toLowerCase().equals("host") }) { | |||
gateway = 'localhost' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add logger.debug()
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
if (networks) { | ||
if (networks && networks.every { it.key.toLowerCase().equals("host") }) { | ||
gateway = 'localhost' | ||
logger.debug("Will use $gateway as host of $serviceName beacuse it is using HOST network") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in beacuse
:-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo fixed :)
Released as 0.3.4 |
This is actually breaks tests on Windows then boot2docker VM is used:
|
@pzbitskiy ha! thanks, I'll fix that... I moved this to #28 |
For host networked container it uses localhost as a default
fixes #24