{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/16940","labels_url":"https://api.github.com/repos/docker/docker/issues/16940/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/16940/comments","events_url":"https://api.github.com/repos/docker/docker/issues/16940/events","html_url":"https://github.com/docker/docker/pull/16940","id":110958323,"number":16940,"title":"Make default tls host work","user":{"login":"coolljt0725","id":8232360,"avatar_url":"https://avatars.githubusercontent.com/u/8232360?v=3","gravatar_id":"","url":"https://api.github.com/users/coolljt0725","html_url":"https://github.com/coolljt0725","followers_url":"https://api.github.com/users/coolljt0725/followers","following_url":"https://api.github.com/users/coolljt0725/following{/other_user}","gists_url":"https://api.github.com/users/coolljt0725/gists{/gist_id}","starred_url":"https://api.github.com/users/coolljt0725/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coolljt0725/subscriptions","organizations_url":"https://api.github.com/users/coolljt0725/orgs","repos_url":"https://api.github.com/users/coolljt0725/repos","events_url":"https://api.github.com/users/coolljt0725/events{/privacy}","received_events_url":"https://api.github.com/users/coolljt0725/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/group/windows","name":"group/windows","color":"F6FBFF"},{"url":"https://api.github.com/repos/docker/docker/labels/status/0-triage","name":"status/0-triage","color":"EEEEEE"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-12T11:47:49Z","updated_at":"2015-10-14T06:07:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/16940","html_url":"https://github.com/docker/docker/pull/16940","diff_url":"https://github.com/docker/docker/pull/16940.diff","patch_url":"https://github.com/docker/docker/pull/16940.patch"},"body":"Signed-off-by: Lei Jitang <leijitang@huawei.com>\r\nFrom what I understand #15753 , the default hosts should be like this:\r\n* if enable tls, docker daemon will use default tls hosts `DefaultTLSHost(127.0.0.1:2376)` both for windows and non-windows. see(https://github.com/docker/docker/pull/15753/files#diff-9d18a6929859b5f9739035de6065951dR223)\r\n* if not enable tls, docker daemon will use `DefaultUnixSocket(\"/var/run/docker.sock\")` for non-windows and use `DefaultTCPHost()127.0.0.1:2375` for windows \r\n\r\nBut actually `DefaultTLSHost` never take effect because it was the first param of `opts.ParseHost()` and it never used, and #16930  remove this.\r\n\r\nThis PR is to revert #16930 and make tls host work.\r\n\r\nOr am I missing something? correct me if I'm wrong\r\n\r\n\r\n/cc @SvenDowideit  @duglin "},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/147946526","html_url":"https://github.com/docker/docker/pull/16940#issuecomment-147946526","issue_url":"https://api.github.com/repos/docker/docker/issues/16940","id":147946526,"user":{"login":"SvenDowideit","id":28492,"avatar_url":"https://avatars.githubusercontent.com/u/28492?v=3","gravatar_id":"","url":"https://api.github.com/users/SvenDowideit","html_url":"https://github.com/SvenDowideit","followers_url":"https://api.github.com/users/SvenDowideit/followers","following_url":"https://api.github.com/users/SvenDowideit/following{/other_user}","gists_url":"https://api.github.com/users/SvenDowideit/gists{/gist_id}","starred_url":"https://api.github.com/users/SvenDowideit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SvenDowideit/subscriptions","organizations_url":"https://api.github.com/users/SvenDowideit/orgs","repos_url":"https://api.github.com/users/SvenDowideit/repos","events_url":"https://api.github.com/users/SvenDowideit/events{/privacy}","received_events_url":"https://api.github.com/users/SvenDowideit/received_events","type":"User","site_admin":false},"created_at":"2015-10-14T06:07:06Z","updated_at":"2015-10-14T06:07:06Z","body":"the reason that we need to do the defaulting twice, is that the first time we need to non-destructivly test for the cmdline param's values for the sake of erroring out and showing the usage (as you need to tell the user what was wrong with their input, not a modified version of the input - the flags pkg is pretty horrible for that), whereas the second time around we can default destructivly, including partial defaulting of the values."}}