{"action":"created","comment":{"url":"https://api.github.com/repos/docker/libcompose/pulls/comments/38999928","id":38999928,"diff_hunk":"@@ -273,3 +279,13 @@ func (s *Service) Containers() ([]project.Container, error) {\n \n \treturn result, nil\n }\n+\n+func (s *Service) SpecificiesHostPort() bool {\n+\tfor _, port := range s.serviceConfig.Ports {\n+\t\tif strings.ContainsRune(port, ':') {\n+\t\t\treturn true\n+\t\t}\n+\t}","path":"docker/service.go","position":30,"original_position":30,"commit_id":"9a17fd780db57399a1e7378028fff693cbe2cacd","original_commit_id":"9a17fd780db57399a1e7378028fff693cbe2cacd","user":{"login":"joshwget","id":6208550,"avatar_url":"https://avatars.githubusercontent.com/u/6208550?v=3","gravatar_id":"","url":"https://api.github.com/users/joshwget","html_url":"https://github.com/joshwget","followers_url":"https://api.github.com/users/joshwget/followers","following_url":"https://api.github.com/users/joshwget/following{/other_user}","gists_url":"https://api.github.com/users/joshwget/gists{/gist_id}","starred_url":"https://api.github.com/users/joshwget/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshwget/subscriptions","organizations_url":"https://api.github.com/users/joshwget/orgs","repos_url":"https://api.github.com/users/joshwget/repos","events_url":"https://api.github.com/users/joshwget/events{/privacy}","received_events_url":"https://api.github.com/users/joshwget/received_events","type":"User","site_admin":false},"body":"Thanks for catching this! It looks like <IP>::<port> is the only case that fails, so it should be sufficient to check that \"::\" also isn't in the port string, right?","created_at":"2015-09-09T01:37:26Z","updated_at":"2015-09-09T01:37:26Z","html_url":"https://github.com/docker/libcompose/pull/48#discussion_r38999928","pull_request_url":"https://api.github.com/repos/docker/libcompose/pulls/48","_links":{"self":{"href":"https://api.github.com/repos/docker/libcompose/pulls/comments/38999928"},"html":{"href":"https://github.com/docker/libcompose/pull/48#discussion_r38999928"},"pull_request":{"href":"https://api.github.com/repos/docker/libcompose/pulls/48"}}},"pull_request":{"url":"https://api.github.com/repos/docker/libcompose/pulls/48","id":44388807,"html_url":"https://github.com/docker/libcompose/pull/48","diff_url":"https://github.com/docker/libcompose/pull/48.diff","patch_url":"https://github.com/docker/libcompose/pull/48.patch","issue_url":"https://api.github.com/repos/docker/libcompose/issues/48","number":48,"state":"open","locked":false,"title":"Warn if scaling a service that specifies a host port","user":{"login":"joshwget","id":6208550,"avatar_url":"https://avatars.githubusercontent.com/u/6208550?v=3","gravatar_id":"","url":"https://api.github.com/users/joshwget","html_url":"https://github.com/joshwget","followers_url":"https://api.github.com/users/joshwget/followers","following_url":"https://api.github.com/users/joshwget/following{/other_user}","gists_url":"https://api.github.com/users/joshwget/gists{/gist_id}","starred_url":"https://api.github.com/users/joshwget/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshwget/subscriptions","organizations_url":"https://api.github.com/users/joshwget/orgs","repos_url":"https://api.github.com/users/joshwget/repos","events_url":"https://api.github.com/users/joshwget/events{/privacy}","received_events_url":"https://api.github.com/users/joshwget/received_events","type":"User","site_admin":false},"body":"Mimics the warning that Compose gives when trying to scale a service that specifies a port on the host.\r\n\r\nSigned-off-by: Josh Curl <hello@joshcurl.com>","created_at":"2015-09-08T02:56:03Z","updated_at":"2015-09-09T01:37:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1f18bce799f2eb562a40a516a16c481b223f3c6d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker/libcompose/pulls/48/commits","review_comments_url":"https://api.github.com/repos/docker/libcompose/pulls/48/comments","review_comment_url":"https://api.github.com/repos/docker/libcompose/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/libcompose/issues/48/comments","statuses_url":"https://api.github.com/repos/docker/libcompose/statuses/9a17fd780db57399a1e7378028fff693cbe2cacd","head":{"label":"joshwget:scale-with-host-port-warning","ref":"scale-with-host-port-warning","sha":"9a17fd780db57399a1e7378028fff693cbe2cacd","user":{"login":"joshwget","id":6208550,"avatar_url":"https://avatars.githubusercontent.com/u/6208550?v=3","gravatar_id":"","url":"https://api.github.com/users/joshwget","html_url":"https://github.com/joshwget","followers_url":"https://api.github.com/users/joshwget/followers","following_url":"https://api.github.com/users/joshwget/following{/other_user}","gists_url":"https://api.github.com/users/joshwget/gists{/gist_id}","starred_url":"https://api.github.com/users/joshwget/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshwget/subscriptions","organizations_url":"https://api.github.com/users/joshwget/orgs","repos_url":"https://api.github.com/users/joshwget/repos","events_url":"https://api.github.com/users/joshwget/events{/privacy}","received_events_url":"https://api.github.com/users/joshwget/received_events","type":"User","site_admin":false},"repo":{"id":41385015,"name":"libcompose","full_name":"joshwget/libcompose","owner":{"login":"joshwget","id":6208550,"avatar_url":"https://avatars.githubusercontent.com/u/6208550?v=3","gravatar_id":"","url":"https://api.github.com/users/joshwget","html_url":"https://github.com/joshwget","followers_url":"https://api.github.com/users/joshwget/followers","following_url":"https://api.github.com/users/joshwget/following{/other_user}","gists_url":"https://api.github.com/users/joshwget/gists{/gist_id}","starred_url":"https://api.github.com/users/joshwget/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshwget/subscriptions","organizations_url":"https://api.github.com/users/joshwget/orgs","repos_url":"https://api.github.com/users/joshwget/repos","events_url":"https://api.github.com/users/joshwget/events{/privacy}","received_events_url":"https://api.github.com/users/joshwget/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/joshwget/libcompose","description":"","fork":true,"url":"https://api.github.com/repos/joshwget/libcompose","forks_url":"https://api.github.com/repos/joshwget/libcompose/forks","keys_url":"https://api.github.com/repos/joshwget/libcompose/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joshwget/libcompose/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joshwget/libcompose/teams","hooks_url":"https://api.github.com/repos/joshwget/libcompose/hooks","issue_events_url":"https://api.github.com/repos/joshwget/libcompose/issues/events{/number}","events_url":"https://api.github.com/repos/joshwget/libcompose/events","assignees_url":"https://api.github.com/repos/joshwget/libcompose/assignees{/user}","branches_url":"https://api.github.com/repos/joshwget/libcompose/branches{/branch}","tags_url":"https://api.github.com/repos/joshwget/libcompose/tags","blobs_url":"https://api.github.com/repos/joshwget/libcompose/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joshwget/libcompose/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joshwget/libcompose/git/refs{/sha}","trees_url":"https://api.github.com/repos/joshwget/libcompose/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joshwget/libcompose/statuses/{sha}","languages_url":"https://api.github.com/repos/joshwget/libcompose/languages","stargazers_url":"https://api.github.com/repos/joshwget/libcompose/stargazers","contributors_url":"https://api.github.com/repos/joshwget/libcompose/contributors","subscribers_url":"https://api.github.com/repos/joshwget/libcompose/subscribers","subscription_url":"https://api.github.com/repos/joshwget/libcompose/subscription","commits_url":"https://api.github.com/repos/joshwget/libcompose/commits{/sha}","git_commits_url":"https://api.github.com/repos/joshwget/libcompose/git/commits{/sha}","comments_url":"https://api.github.com/repos/joshwget/libcompose/comments{/number}","issue_comment_url":"https://api.github.com/repos/joshwget/libcompose/issues/comments{/number}","contents_url":"https://api.github.com/repos/joshwget/libcompose/contents/{+path}","compare_url":"https://api.github.com/repos/joshwget/libcompose/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joshwget/libcompose/merges","archive_url":"https://api.github.com/repos/joshwget/libcompose/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joshwget/libcompose/downloads","issues_url":"https://api.github.com/repos/joshwget/libcompose/issues{/number}","pulls_url":"https://api.github.com/repos/joshwget/libcompose/pulls{/number}","milestones_url":"https://api.github.com/repos/joshwget/libcompose/milestones{/number}","notifications_url":"https://api.github.com/repos/joshwget/libcompose/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joshwget/libcompose/labels{/name}","releases_url":"https://api.github.com/repos/joshwget/libcompose/releases{/id}","created_at":"2015-08-25T19:59:16Z","updated_at":"2015-08-25T19:59:17Z","pushed_at":"2015-09-09T00:30:57Z","git_url":"git://github.com/joshwget/libcompose.git","ssh_url":"git@github.com:joshwget/libcompose.git","clone_url":"https://github.com/joshwget/libcompose.git","svn_url":"https://github.com/joshwget/libcompose","homepage":null,"size":1324,"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":"b6317fadde27f8b3f89c980b0880aa79bc43b31c","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":35969237,"name":"libcompose","full_name":"docker/libcompose","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/libcompose","description":"","fork":false,"url":"https://api.github.com/repos/docker/libcompose","forks_url":"https://api.github.com/repos/docker/libcompose/forks","keys_url":"https://api.github.com/repos/docker/libcompose/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/libcompose/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/libcompose/teams","hooks_url":"https://api.github.com/repos/docker/libcompose/hooks","issue_events_url":"https://api.github.com/repos/docker/libcompose/issues/events{/number}","events_url":"https://api.github.com/repos/docker/libcompose/events","assignees_url":"https://api.github.com/repos/docker/libcompose/assignees{/user}","branches_url":"https://api.github.com/repos/docker/libcompose/branches{/branch}","tags_url":"https://api.github.com/repos/docker/libcompose/tags","blobs_url":"https://api.github.com/repos/docker/libcompose/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/libcompose/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/libcompose/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/libcompose/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/libcompose/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/libcompose/languages","stargazers_url":"https://api.github.com/repos/docker/libcompose/stargazers","contributors_url":"https://api.github.com/repos/docker/libcompose/contributors","subscribers_url":"https://api.github.com/repos/docker/libcompose/subscribers","subscription_url":"https://api.github.com/repos/docker/libcompose/subscription","commits_url":"https://api.github.com/repos/docker/libcompose/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/libcompose/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/libcompose/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/libcompose/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/libcompose/contents/{+path}","compare_url":"https://api.github.com/repos/docker/libcompose/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/libcompose/merges","archive_url":"https://api.github.com/repos/docker/libcompose/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/libcompose/downloads","issues_url":"https://api.github.com/repos/docker/libcompose/issues{/number}","pulls_url":"https://api.github.com/repos/docker/libcompose/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/libcompose/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/libcompose/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/libcompose/labels{/name}","releases_url":"https://api.github.com/repos/docker/libcompose/releases{/id}","created_at":"2015-05-20T19:22:20Z","updated_at":"2015-09-07T09:06:02Z","pushed_at":"2015-09-09T00:30:57Z","git_url":"git://github.com/docker/libcompose.git","ssh_url":"git@github.com:docker/libcompose.git","clone_url":"https://github.com/docker/libcompose.git","svn_url":"https://github.com/docker/libcompose","homepage":null,"size":1890,"stargazers_count":212,"watchers_count":212,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":35,"mirror_url":null,"open_issues_count":16,"forks":35,"open_issues":16,"watchers":212,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/libcompose/pulls/48"},"html":{"href":"https://github.com/docker/libcompose/pull/48"},"issue":{"href":"https://api.github.com/repos/docker/libcompose/issues/48"},"comments":{"href":"https://api.github.com/repos/docker/libcompose/issues/48/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/libcompose/pulls/48/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/libcompose/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/libcompose/pulls/48/commits"},"statuses":{"href":"https://api.github.com/repos/docker/libcompose/statuses/9a17fd780db57399a1e7378028fff693cbe2cacd"}}}}