{"action":"opened","number":9945,"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/9945","id":26940683,"html_url":"https://github.com/docker/docker/pull/9945","diff_url":"https://github.com/docker/docker/pull/9945.diff","patch_url":"https://github.com/docker/docker/pull/9945.patch","issue_url":"https://api.github.com/repos/docker/docker/issues/9945","number":9945,"state":"open","locked":false,"title":"Use container name as its hostname","user":{"login":"crquan","id":45689,"avatar_url":"https://avatars.githubusercontent.com/u/45689?v=3","gravatar_id":"","url":"https://api.github.com/users/crquan","html_url":"https://github.com/crquan","followers_url":"https://api.github.com/users/crquan/followers","following_url":"https://api.github.com/users/crquan/following{/other_user}","gists_url":"https://api.github.com/users/crquan/gists{/gist_id}","starred_url":"https://api.github.com/users/crquan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crquan/subscriptions","organizations_url":"https://api.github.com/users/crquan/orgs","repos_url":"https://api.github.com/users/crquan/repos","events_url":"https://api.github.com/users/crquan/events{/privacy}","received_events_url":"https://api.github.com/users/crquan/received_events","type":"User","site_admin":false},"body":"The randomly generated id in hex string is boring,\r\nif we can generate a random name for the container,\r\nwhy not use it as its hostname?\r\n\r\nThis is also supporting if user specified a name:\r\n\r\nThis is more meaningful for those builds tag a hostname, like building linux kernel, next time when I build the kernel inside the docker, I can get a better signature in /proc/version like (root@my-building-box) ...\r\n\r\n```text\r\n[drc@lab11 docker]$ bin/docker-1.4.1-dev-dirty run -i -t --rm --name 'my-building-box' --entrypoint=/bin/bash dche/fedora\r\nbash-4.3# uname -a\r\nLinux my-building-box 3.19.0-0.rc2.git0.1.build.20141231.el7.x86_64 #1 SMP Wed Dec 31 17:45:19 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux\r\nbash-4.3# cat /proc/version\r\nLinux version 3.19.0-0.rc2.git0.1.build.20141231.el7.x86_64 (root@920801690eff) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #1 SMP Wed Dec 31 17:45:19 UTC 2014\r\n```\r\n\r\nSigned-off-by: Derek Che <drc@yahoo-inc.com>","created_at":"2015-01-07T06:46:36Z","updated_at":"2015-01-07T06:46:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker/docker/pulls/9945/commits","review_comments_url":"https://api.github.com/repos/docker/docker/pulls/9945/comments","review_comment_url":"https://api.github.com/repos/docker/docker/pulls/comments/{number}","comments_url":"https://api.github.com/repos/docker/docker/issues/9945/comments","statuses_url":"https://api.github.com/repos/docker/docker/statuses/d6c5599682a397c78f9cb21dbf2cc9e93f7c094a","head":{"label":"crquan:patch-1","ref":"patch-1","sha":"d6c5599682a397c78f9cb21dbf2cc9e93f7c094a","user":{"login":"crquan","id":45689,"avatar_url":"https://avatars.githubusercontent.com/u/45689?v=3","gravatar_id":"","url":"https://api.github.com/users/crquan","html_url":"https://github.com/crquan","followers_url":"https://api.github.com/users/crquan/followers","following_url":"https://api.github.com/users/crquan/following{/other_user}","gists_url":"https://api.github.com/users/crquan/gists{/gist_id}","starred_url":"https://api.github.com/users/crquan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crquan/subscriptions","organizations_url":"https://api.github.com/users/crquan/orgs","repos_url":"https://api.github.com/users/crquan/repos","events_url":"https://api.github.com/users/crquan/events{/privacy}","received_events_url":"https://api.github.com/users/crquan/received_events","type":"User","site_admin":false},"repo":{"id":19873798,"name":"docker","full_name":"crquan/docker","owner":{"login":"crquan","id":45689,"avatar_url":"https://avatars.githubusercontent.com/u/45689?v=3","gravatar_id":"","url":"https://api.github.com/users/crquan","html_url":"https://github.com/crquan","followers_url":"https://api.github.com/users/crquan/followers","following_url":"https://api.github.com/users/crquan/following{/other_user}","gists_url":"https://api.github.com/users/crquan/gists{/gist_id}","starred_url":"https://api.github.com/users/crquan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crquan/subscriptions","organizations_url":"https://api.github.com/users/crquan/orgs","repos_url":"https://api.github.com/users/crquan/repos","events_url":"https://api.github.com/users/crquan/events{/privacy}","received_events_url":"https://api.github.com/users/crquan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/crquan/docker","description":"Docker - the open-source application container engine","fork":true,"url":"https://api.github.com/repos/crquan/docker","forks_url":"https://api.github.com/repos/crquan/docker/forks","keys_url":"https://api.github.com/repos/crquan/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crquan/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crquan/docker/teams","hooks_url":"https://api.github.com/repos/crquan/docker/hooks","issue_events_url":"https://api.github.com/repos/crquan/docker/issues/events{/number}","events_url":"https://api.github.com/repos/crquan/docker/events","assignees_url":"https://api.github.com/repos/crquan/docker/assignees{/user}","branches_url":"https://api.github.com/repos/crquan/docker/branches{/branch}","tags_url":"https://api.github.com/repos/crquan/docker/tags","blobs_url":"https://api.github.com/repos/crquan/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crquan/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crquan/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/crquan/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crquan/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/crquan/docker/languages","stargazers_url":"https://api.github.com/repos/crquan/docker/stargazers","contributors_url":"https://api.github.com/repos/crquan/docker/contributors","subscribers_url":"https://api.github.com/repos/crquan/docker/subscribers","subscription_url":"https://api.github.com/repos/crquan/docker/subscription","commits_url":"https://api.github.com/repos/crquan/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/crquan/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/crquan/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/crquan/docker/issues/comments/{number}","contents_url":"https://api.github.com/repos/crquan/docker/contents/{+path}","compare_url":"https://api.github.com/repos/crquan/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crquan/docker/merges","archive_url":"https://api.github.com/repos/crquan/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crquan/docker/downloads","issues_url":"https://api.github.com/repos/crquan/docker/issues{/number}","pulls_url":"https://api.github.com/repos/crquan/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/crquan/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/crquan/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crquan/docker/labels{/name}","releases_url":"https://api.github.com/repos/crquan/docker/releases{/id}","created_at":"2014-05-16T23:40:46Z","updated_at":"2014-07-24T21:22:47Z","pushed_at":"2015-01-07T06:41:10Z","git_url":"git://github.com/crquan/docker.git","ssh_url":"git@github.com:crquan/docker.git","clone_url":"https://github.com/crquan/docker.git","svn_url":"https://github.com/crquan/docker","homepage":"http://www.docker.io","size":38177,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"docker:master","ref":"master","sha":"f65b781d2151973c233d7c517635208c2b96dce4","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":7691631,"name":"docker","full_name":"docker/docker","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/docker","description":"Docker - the open-source application container engine","fork":false,"url":"https://api.github.com/repos/docker/docker","forks_url":"https://api.github.com/repos/docker/docker/forks","keys_url":"https://api.github.com/repos/docker/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/docker/teams","hooks_url":"https://api.github.com/repos/docker/docker/hooks","issue_events_url":"https://api.github.com/repos/docker/docker/issues/events{/number}","events_url":"https://api.github.com/repos/docker/docker/events","assignees_url":"https://api.github.com/repos/docker/docker/assignees{/user}","branches_url":"https://api.github.com/repos/docker/docker/branches{/branch}","tags_url":"https://api.github.com/repos/docker/docker/tags","blobs_url":"https://api.github.com/repos/docker/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/docker/languages","stargazers_url":"https://api.github.com/repos/docker/docker/stargazers","contributors_url":"https://api.github.com/repos/docker/docker/contributors","subscribers_url":"https://api.github.com/repos/docker/docker/subscribers","subscription_url":"https://api.github.com/repos/docker/docker/subscription","commits_url":"https://api.github.com/repos/docker/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/docker/issues/comments/{number}","contents_url":"https://api.github.com/repos/docker/docker/contents/{+path}","compare_url":"https://api.github.com/repos/docker/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/docker/merges","archive_url":"https://api.github.com/repos/docker/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/docker/downloads","issues_url":"https://api.github.com/repos/docker/docker/issues{/number}","pulls_url":"https://api.github.com/repos/docker/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/docker/labels{/name}","releases_url":"https://api.github.com/repos/docker/docker/releases{/id}","created_at":"2013-01-18T18:10:57Z","updated_at":"2015-01-07T06:23:32Z","pushed_at":"2015-01-07T04:26:29Z","git_url":"git://github.com/docker/docker.git","ssh_url":"git@github.com:docker/docker.git","clone_url":"https://github.com/docker/docker.git","svn_url":"https://github.com/docker/docker","homepage":"http://www.docker.com","size":122818,"stargazers_count":18177,"watchers_count":18177,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3687,"mirror_url":null,"open_issues_count":990,"forks":3687,"open_issues":990,"watchers":18177,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/9945"},"html":{"href":"https://github.com/docker/docker/pull/9945"},"issue":{"href":"https://api.github.com/repos/docker/docker/issues/9945"},"comments":{"href":"https://api.github.com/repos/docker/docker/issues/9945/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/docker/pulls/9945/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/docker/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/docker/docker/pulls/9945/commits"},"statuses":{"href":"https://api.github.com/repos/docker/docker/statuses/d6c5599682a397c78f9cb21dbf2cc9e93f7c094a"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":6,"deletions":3,"changed_files":1}}