-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Always uses socketPath unless it is set to null #114
Comments
@apocas would it be wise for us to consider exposing this as a utility function for users of the lib to call so that they may explicitly pass this into the constructor rather than it being auto-populated? This can avoid some ambiguity with the options being passed in and how they're manipulated. Or if a Examples new Docker(); // uses the defaultOpts function
new Docker({}); // does not use defaultOpts function, will throw an error since neither socketPath nor host/port is defined
new Docker({ host: '10.0.0.123' }); // host is defined, defaultOpts should not be called, but will throw error for missing port parameter This will result in a major revision since this is technical breaking changes as we're going to be modifying the default behavior. If we can come to a consensus here, I can start a PR with these changes. I understand that Thanks for all the hard work! Let me know what you and other folks think is the best way forward. Lines in question here for reference: Lines 16 to 69 in 3e3bb24
|
Hello and thanks for terrific package :)
I followed the examples in the readme and did:
But it would still connect to the default unix socket. Finally I figured out that explicitly setting socketPath to null I could get it to respect the options. I.e. this works:
the solution lies under here, it should first check for http then go for socket option;
in
lib/modem.js
The text was updated successfully, but these errors were encountered: