{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/source-to-image/pulls/comments/73456636","id":73456636,"diff_hunk":"@@ -665,39 +789,90 @@ func determineCommandBaseDir(opts RunContainerOptions, imageMetadata *docker.Ima\n }\n \n // dumpContainerInfo dumps information about a running container (port/IP/etc).\n-func dumpContainerInfo(container *docker.Container, d *stiDocker, image string) {\n-\tcont, icerr := d.client.InspectContainer(container.ID)\n+func dumpContainerInfo(container *dockertypes.ContainerCreateResponse, d *stiDocker, image string) {\n+\tcontainerJSON, err := d.kubeDockerClient.InspectContainer(container.ID)\n+\tif err != nil {\n+\t\treturn\n+\t}\n+\n \tliveports := \"\\n\\nPort Bindings:  \"\n-\tif icerr == nil {\n-\t\t// Ports is of the following type:  map[docker.Port][]docker.PortBinding\n-\t\tfor port, bindings := range cont.NetworkSettings.Ports {\n-\t\t\tliveports = liveports + \"\\n  Container Port:  \" + port.Port()\n-\t\t\tliveports = liveports + \"\\n        Protocol:  \" + port.Proto()\n-\t\t\tliveports = liveports + \"\\n        Public Host / Port Mappings:\"\n-\t\t\tfor _, binding := range bindings {\n-\t\t\t\tliveports = liveports + \"\\n            IP: \" + binding.HostIP + \" Port: \" + binding.HostPort\n-\t\t\t}\n+\tfor port, bindings := range containerJSON.NetworkSettings.NetworkSettingsBase.Ports {\n+\t\tliveports = liveports + \"\\n  Container Port:  \" + string(port)\n+\t\tfor _, binding := range bindings {\n+\t\t\tliveports = liveports + \"\\n            IP: \" + binding.HostIP + \" Port: \" + binding.HostPort\n \t\t}\n-\t\tliveports = liveports + \"\\n\"\n \t}\n+\tliveports = liveports + \"\\n\"\n \tglog.V(0).Infof(\"\\n\\n\\n\\n\\nThe image %s has been started in container %s as a result of the --run=true option.  The container's stdout/stderr will be redirected to this command's glog output to help you validate its behavior.  You can also inspect the container with docker commands if you like.  If the container is set up to stay running, you will have to Ctrl-C to exit this command, which should also stop the container %s.  This particular invocation attempts to run with the port mappings %+v \\n\\n\\n\\n\\n\", image, container.ID, container.ID, liveports)\n }\n \n+// b copy from kube_docker_client.go ... essentially, if that code could give is a way to inspect the error from engin-api's ContainerAttach call prior\n+// to blocking on the IO, we could just leverage the kube_docker_client.go code entirely ... essentially a \"non-blocking\" attach like go-dockerclient provided","path":"pkg/docker/docker.go","position":668,"original_position":668,"commit_id":"068c1c2bd2a589952a1bd740f976bca1c1fd8657","original_commit_id":"068c1c2bd2a589952a1bd740f976bca1c1fd8657","user":{"login":"bparees","id":4974046,"avatar_url":"https://avatars.githubusercontent.com/u/4974046?v=3","gravatar_id":"","url":"https://api.github.com/users/bparees","html_url":"https://github.com/bparees","followers_url":"https://api.github.com/users/bparees/followers","following_url":"https://api.github.com/users/bparees/following{/other_user}","gists_url":"https://api.github.com/users/bparees/gists{/gist_id}","starred_url":"https://api.github.com/users/bparees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bparees/subscriptions","organizations_url":"https://api.github.com/users/bparees/orgs","repos_url":"https://api.github.com/users/bparees/repos","events_url":"https://api.github.com/users/bparees/events{/privacy}","received_events_url":"https://api.github.com/users/bparees/received_events","type":"User","site_admin":false},"body":"or is // b supposed to mean // begin ?  (figured that out based on the // e at the end, i think it could be made more obvious)\r\n","created_at":"2016-08-04T03:10:37Z","updated_at":"2016-08-04T03:10:37Z","html_url":"https://github.com/openshift/source-to-image/pull/554#discussion_r73456636","pull_request_url":"https://api.github.com/repos/openshift/source-to-image/pulls/554","_links":{"self":{"href":"https://api.github.com/repos/openshift/source-to-image/pulls/comments/73456636"},"html":{"href":"https://github.com/openshift/source-to-image/pull/554#discussion_r73456636"},"pull_request":{"href":"https://api.github.com/repos/openshift/source-to-image/pulls/554"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/source-to-image/pulls/554","id":78717192,"html_url":"https://github.com/openshift/source-to-image/pull/554","diff_url":"https://github.com/openshift/source-to-image/pull/554.diff","patch_url":"https://github.com/openshift/source-to-image/pull/554.patch","issue_url":"https://api.github.com/repos/openshift/source-to-image/issues/554","number":554,"state":"open","locked":false,"title":"Move to kube and engine2","user":{"login":"gabemontero","id":3594868,"avatar_url":"https://avatars.githubusercontent.com/u/3594868?v=3","gravatar_id":"","url":"https://api.github.com/users/gabemontero","html_url":"https://github.com/gabemontero","followers_url":"https://api.github.com/users/gabemontero/followers","following_url":"https://api.github.com/users/gabemontero/following{/other_user}","gists_url":"https://api.github.com/users/gabemontero/gists{/gist_id}","starred_url":"https://api.github.com/users/gabemontero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabemontero/subscriptions","organizations_url":"https://api.github.com/users/gabemontero/orgs","repos_url":"https://api.github.com/users/gabemontero/repos","events_url":"https://api.github.com/users/gabemontero/events{/privacy}","received_events_url":"https://api.github.com/users/gabemontero/received_events","type":"User","site_admin":false},"body":"OK, let it begin  ..... \r\n\r\n@bparees @csrwng @jupierce @oatmealraisin @php-coder @PI-Victor @soltysh ","created_at":"2016-07-25T17:07:43Z","updated_at":"2016-08-04T03:10:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"85b885c56864bbb23970d2d323a8373981308589","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/openshift/source-to-image/pulls/554/commits","review_comments_url":"https://api.github.com/repos/openshift/source-to-image/pulls/554/comments","review_comment_url":"https://api.github.com/repos/openshift/source-to-image/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/source-to-image/issues/554/comments","statuses_url":"https://api.github.com/repos/openshift/source-to-image/statuses/068c1c2bd2a589952a1bd740f976bca1c1fd8657","head":{"label":"gabemontero:moveToKubeAndEngine2","ref":"moveToKubeAndEngine2","sha":"068c1c2bd2a589952a1bd740f976bca1c1fd8657","user":{"login":"gabemontero","id":3594868,"avatar_url":"https://avatars.githubusercontent.com/u/3594868?v=3","gravatar_id":"","url":"https://api.github.com/users/gabemontero","html_url":"https://github.com/gabemontero","followers_url":"https://api.github.com/users/gabemontero/followers","following_url":"https://api.github.com/users/gabemontero/following{/other_user}","gists_url":"https://api.github.com/users/gabemontero/gists{/gist_id}","starred_url":"https://api.github.com/users/gabemontero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabemontero/subscriptions","organizations_url":"https://api.github.com/users/gabemontero/orgs","repos_url":"https://api.github.com/users/gabemontero/repos","events_url":"https://api.github.com/users/gabemontero/events{/privacy}","received_events_url":"https://api.github.com/users/gabemontero/received_events","type":"User","site_admin":false},"repo":{"id":36944033,"name":"source-to-image","full_name":"gabemontero/source-to-image","owner":{"login":"gabemontero","id":3594868,"avatar_url":"https://avatars.githubusercontent.com/u/3594868?v=3","gravatar_id":"","url":"https://api.github.com/users/gabemontero","html_url":"https://github.com/gabemontero","followers_url":"https://api.github.com/users/gabemontero/followers","following_url":"https://api.github.com/users/gabemontero/following{/other_user}","gists_url":"https://api.github.com/users/gabemontero/gists{/gist_id}","starred_url":"https://api.github.com/users/gabemontero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabemontero/subscriptions","organizations_url":"https://api.github.com/users/gabemontero/orgs","repos_url":"https://api.github.com/users/gabemontero/repos","events_url":"https://api.github.com/users/gabemontero/events{/privacy}","received_events_url":"https://api.github.com/users/gabemontero/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gabemontero/source-to-image","description":"A tool for building/building artifacts from source and injecting into docker images","fork":true,"url":"https://api.github.com/repos/gabemontero/source-to-image","forks_url":"https://api.github.com/repos/gabemontero/source-to-image/forks","keys_url":"https://api.github.com/repos/gabemontero/source-to-image/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gabemontero/source-to-image/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gabemontero/source-to-image/teams","hooks_url":"https://api.github.com/repos/gabemontero/source-to-image/hooks","issue_events_url":"https://api.github.com/repos/gabemontero/source-to-image/issues/events{/number}","events_url":"https://api.github.com/repos/gabemontero/source-to-image/events","assignees_url":"https://api.github.com/repos/gabemontero/source-to-image/assignees{/user}","branches_url":"https://api.github.com/repos/gabemontero/source-to-image/branches{/branch}","tags_url":"https://api.github.com/repos/gabemontero/source-to-image/tags","blobs_url":"https://api.github.com/repos/gabemontero/source-to-image/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gabemontero/source-to-image/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gabemontero/source-to-image/git/refs{/sha}","trees_url":"https://api.github.com/repos/gabemontero/source-to-image/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gabemontero/source-to-image/statuses/{sha}","languages_url":"https://api.github.com/repos/gabemontero/source-to-image/languages","stargazers_url":"https://api.github.com/repos/gabemontero/source-to-image/stargazers","contributors_url":"https://api.github.com/repos/gabemontero/source-to-image/contributors","subscribers_url":"https://api.github.com/repos/gabemontero/source-to-image/subscribers","subscription_url":"https://api.github.com/repos/gabemontero/source-to-image/subscription","commits_url":"https://api.github.com/repos/gabemontero/source-to-image/commits{/sha}","git_commits_url":"https://api.github.com/repos/gabemontero/source-to-image/git/commits{/sha}","comments_url":"https://api.github.com/repos/gabemontero/source-to-image/comments{/number}","issue_comment_url":"https://api.github.com/repos/gabemontero/source-to-image/issues/comments{/number}","contents_url":"https://api.github.com/repos/gabemontero/source-to-image/contents/{+path}","compare_url":"https://api.github.com/repos/gabemontero/source-to-image/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gabemontero/source-to-image/merges","archive_url":"https://api.github.com/repos/gabemontero/source-to-image/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gabemontero/source-to-image/downloads","issues_url":"https://api.github.com/repos/gabemontero/source-to-image/issues{/number}","pulls_url":"https://api.github.com/repos/gabemontero/source-to-image/pulls{/number}","milestones_url":"https://api.github.com/repos/gabemontero/source-to-image/milestones{/number}","notifications_url":"https://api.github.com/repos/gabemontero/source-to-image/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gabemontero/source-to-image/labels{/name}","releases_url":"https://api.github.com/repos/gabemontero/source-to-image/releases{/id}","deployments_url":"https://api.github.com/repos/gabemontero/source-to-image/deployments","created_at":"2015-06-05T16:49:12Z","updated_at":"2016-01-17T16:58:35Z","pushed_at":"2016-08-02T13:15:45Z","git_url":"git://github.com/gabemontero/source-to-image.git","ssh_url":"git@github.com:gabemontero/source-to-image.git","clone_url":"https://github.com/gabemontero/source-to-image.git","svn_url":"https://github.com/gabemontero/source-to-image","homepage":"","size":11615,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"openshift:master","ref":"master","sha":"724c0ddaacec2fad31a05ac2d2175cd9ad7136c6","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":16323162,"name":"source-to-image","full_name":"openshift/source-to-image","owner":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/source-to-image","description":"A tool for building/building artifacts from source and injecting into docker images","fork":false,"url":"https://api.github.com/repos/openshift/source-to-image","forks_url":"https://api.github.com/repos/openshift/source-to-image/forks","keys_url":"https://api.github.com/repos/openshift/source-to-image/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/source-to-image/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/source-to-image/teams","hooks_url":"https://api.github.com/repos/openshift/source-to-image/hooks","issue_events_url":"https://api.github.com/repos/openshift/source-to-image/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/source-to-image/events","assignees_url":"https://api.github.com/repos/openshift/source-to-image/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/source-to-image/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/source-to-image/tags","blobs_url":"https://api.github.com/repos/openshift/source-to-image/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/source-to-image/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/source-to-image/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/source-to-image/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/source-to-image/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/source-to-image/languages","stargazers_url":"https://api.github.com/repos/openshift/source-to-image/stargazers","contributors_url":"https://api.github.com/repos/openshift/source-to-image/contributors","subscribers_url":"https://api.github.com/repos/openshift/source-to-image/subscribers","subscription_url":"https://api.github.com/repos/openshift/source-to-image/subscription","commits_url":"https://api.github.com/repos/openshift/source-to-image/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/source-to-image/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/source-to-image/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/source-to-image/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/source-to-image/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/source-to-image/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/source-to-image/merges","archive_url":"https://api.github.com/repos/openshift/source-to-image/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/source-to-image/downloads","issues_url":"https://api.github.com/repos/openshift/source-to-image/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/source-to-image/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/source-to-image/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/source-to-image/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/source-to-image/labels{/name}","releases_url":"https://api.github.com/repos/openshift/source-to-image/releases{/id}","deployments_url":"https://api.github.com/repos/openshift/source-to-image/deployments","created_at":"2014-01-28T19:32:40Z","updated_at":"2016-08-02T19:39:51Z","pushed_at":"2016-08-03T19:45:44Z","git_url":"git://github.com/openshift/source-to-image.git","ssh_url":"git@github.com:openshift/source-to-image.git","clone_url":"https://github.com/openshift/source-to-image.git","svn_url":"https://github.com/openshift/source-to-image","homepage":"","size":11722,"stargazers_count":270,"watchers_count":270,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":132,"mirror_url":null,"open_issues_count":21,"forks":132,"open_issues":21,"watchers":270,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/source-to-image/pulls/554"},"html":{"href":"https://github.com/openshift/source-to-image/pull/554"},"issue":{"href":"https://api.github.com/repos/openshift/source-to-image/issues/554"},"comments":{"href":"https://api.github.com/repos/openshift/source-to-image/issues/554/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/source-to-image/pulls/554/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/source-to-image/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/source-to-image/pulls/554/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/source-to-image/statuses/068c1c2bd2a589952a1bd740f976bca1c1fd8657"}}}}
{"actor":{"display_login":"bparees"}}