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

Improve Check for localunixsocket on Mac #248

Open
nathanloyer opened this issue Aug 29, 2018 · 0 comments
Open

Improve Check for localunixsocket on Mac #248

nathanloyer opened this issue Aug 29, 2018 · 0 comments

Comments

@nathanloyer
Copy link

nathanloyer commented Aug 29, 2018

I've been using docker for a few years and had added 127.0.0.1 localunixsocket (with a tab) a long time ago, and have been getting the warnings from docker regardless. I only just now looked into it and found that the check to make sure localunixsocket points to 127.0.0.1 is done by checking for an exact string. A better check would be to try to resolve localunixsocket and see if you get 127.0.0.1 for the IP. Another option that would catch everything would be to use regex with something like 127.0.0.1\\s+localunixsocket.

private static final String REDIRECT_LINE = "127.0.0.1 localunixsocket\n";

This isn't very important, just something that bugged me when I figured out the cause.

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

No branches or pull requests

1 participant