{"action":"created","comment":{"url":"https://api.github.com/repos/allegro/ralph-docker/pulls/comments/27067068","id":27067068,"diff_hunk":"@@ -0,0 +1,69 @@\n+#!/bin/bash\n+\n+set -e\n+\n+die () {\n+    echo >&2 \"$@\"\n+    exit 1\n+}\n+\n+if [ \"$1\" = \"clean\" ]; then\n+\t# kill all running containers\n+\tsudo docker kill $(docker ps -q)\n+\tsudo docker images -q --filter \"dangling=true\" | xargs sudo docker rmi || true\n+\tsudo docker stop $(sudo docker ps -a -q) || true\n+fi\n+\n+if [ \"$#\" -lt \"2\" ]; then \n+ die \"Usage: build.sh [clean] [build <instance>]\"\n+fi\n+\n+instance=\"$2\"\n+image_name=$instance\n+\n+if [ \"$instance\" == \"os\" ]; then \n+\timage_name=\"vi4m/ralph:latest\"\n+fi\n+\t\n+if [ \"$1\" = \"build\" ]; then\n+\t./$instance/build.sh \n+fi\n+\n+if [ \"$1\" = \"debug\" ]; then\n+\tsudo docker run  --rm=true --name ${instance} -p 9000:9000 -t -i --volumes-from ${instance}_storage devdemo $3 $4 $5 $6 $7 $8","path":"run.sh","position":33,"original_position":33,"commit_id":"b2301b32bd8003c7ff906a2f3b7c747aa7ebfa03","original_commit_id":"b2301b32bd8003c7ff906a2f3b7c747aa7ebfa03","user":{"login":"mkurek","id":107437,"avatar_url":"https://avatars.githubusercontent.com/u/107437?v=3","gravatar_id":"","url":"https://api.github.com/users/mkurek","html_url":"https://github.com/mkurek","followers_url":"https://api.github.com/users/mkurek/followers","following_url":"https://api.github.com/users/mkurek/following{/other_user}","gists_url":"https://api.github.com/users/mkurek/gists{/gist_id}","starred_url":"https://api.github.com/users/mkurek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkurek/subscriptions","organizations_url":"https://api.github.com/users/mkurek/orgs","repos_url":"https://api.github.com/users/mkurek/repos","events_url":"https://api.github.com/users/mkurek/events{/privacy}","received_events_url":"https://api.github.com/users/mkurek/received_events","type":"User","site_admin":false},"body":"devdemo?","created_at":"2015-03-24T20:02:17Z","updated_at":"2015-03-24T20:02:17Z","html_url":"https://github.com/allegro/ralph-docker/pull/1#discussion_r27067068","pull_request_url":"https://api.github.com/repos/allegro/ralph-docker/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/allegro/ralph-docker/pulls/comments/27067068"},"html":{"href":"https://github.com/allegro/ralph-docker/pull/1#discussion_r27067068"},"pull_request":{"href":"https://api.github.com/repos/allegro/ralph-docker/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/allegro/ralph-docker/pulls/1","id":31863644,"html_url":"https://github.com/allegro/ralph-docker/pull/1","diff_url":"https://github.com/allegro/ralph-docker/pull/1.diff","patch_url":"https://github.com/allegro/ralph-docker/pull/1.patch","issue_url":"https://api.github.com/repos/allegro/ralph-docker/issues/1","number":1,"state":"open","locked":false,"title":"Build docker images","user":{"login":"szok","id":2209581,"avatar_url":"https://avatars.githubusercontent.com/u/2209581?v=3","gravatar_id":"","url":"https://api.github.com/users/szok","html_url":"https://github.com/szok","followers_url":"https://api.github.com/users/szok/followers","following_url":"https://api.github.com/users/szok/following{/other_user}","gists_url":"https://api.github.com/users/szok/gists{/gist_id}","starred_url":"https://api.github.com/users/szok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szok/subscriptions","organizations_url":"https://api.github.com/users/szok/orgs","repos_url":"https://api.github.com/users/szok/repos","events_url":"https://api.github.com/users/szok/events{/privacy}","received_events_url":"https://api.github.com/users/szok/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-24T19:53:50Z","updated_at":"2015-03-24T20:02:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aa1d43901e48f753cae2d8a180126cda81420219","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/allegro/ralph-docker/pulls/1/commits","review_comments_url":"https://api.github.com/repos/allegro/ralph-docker/pulls/1/comments","review_comment_url":"https://api.github.com/repos/allegro/ralph-docker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/allegro/ralph-docker/issues/1/comments","statuses_url":"https://api.github.com/repos/allegro/ralph-docker/statuses/b2301b32bd8003c7ff906a2f3b7c747aa7ebfa03","head":{"label":"szok:feature/docker-config","ref":"feature/docker-config","sha":"b2301b32bd8003c7ff906a2f3b7c747aa7ebfa03","user":{"login":"szok","id":2209581,"avatar_url":"https://avatars.githubusercontent.com/u/2209581?v=3","gravatar_id":"","url":"https://api.github.com/users/szok","html_url":"https://github.com/szok","followers_url":"https://api.github.com/users/szok/followers","following_url":"https://api.github.com/users/szok/following{/other_user}","gists_url":"https://api.github.com/users/szok/gists{/gist_id}","starred_url":"https://api.github.com/users/szok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szok/subscriptions","organizations_url":"https://api.github.com/users/szok/orgs","repos_url":"https://api.github.com/users/szok/repos","events_url":"https://api.github.com/users/szok/events{/privacy}","received_events_url":"https://api.github.com/users/szok/received_events","type":"User","site_admin":false},"repo":{"id":32727963,"name":"ralph-docker","full_name":"szok/ralph-docker","owner":{"login":"szok","id":2209581,"avatar_url":"https://avatars.githubusercontent.com/u/2209581?v=3","gravatar_id":"","url":"https://api.github.com/users/szok","html_url":"https://github.com/szok","followers_url":"https://api.github.com/users/szok/followers","following_url":"https://api.github.com/users/szok/following{/other_user}","gists_url":"https://api.github.com/users/szok/gists{/gist_id}","starred_url":"https://api.github.com/users/szok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szok/subscriptions","organizations_url":"https://api.github.com/users/szok/orgs","repos_url":"https://api.github.com/users/szok/repos","events_url":"https://api.github.com/users/szok/events{/privacy}","received_events_url":"https://api.github.com/users/szok/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/szok/ralph-docker","description":"Ralph docker image configuration","fork":true,"url":"https://api.github.com/repos/szok/ralph-docker","forks_url":"https://api.github.com/repos/szok/ralph-docker/forks","keys_url":"https://api.github.com/repos/szok/ralph-docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/szok/ralph-docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/szok/ralph-docker/teams","hooks_url":"https://api.github.com/repos/szok/ralph-docker/hooks","issue_events_url":"https://api.github.com/repos/szok/ralph-docker/issues/events{/number}","events_url":"https://api.github.com/repos/szok/ralph-docker/events","assignees_url":"https://api.github.com/repos/szok/ralph-docker/assignees{/user}","branches_url":"https://api.github.com/repos/szok/ralph-docker/branches{/branch}","tags_url":"https://api.github.com/repos/szok/ralph-docker/tags","blobs_url":"https://api.github.com/repos/szok/ralph-docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/szok/ralph-docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/szok/ralph-docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/szok/ralph-docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/szok/ralph-docker/statuses/{sha}","languages_url":"https://api.github.com/repos/szok/ralph-docker/languages","stargazers_url":"https://api.github.com/repos/szok/ralph-docker/stargazers","contributors_url":"https://api.github.com/repos/szok/ralph-docker/contributors","subscribers_url":"https://api.github.com/repos/szok/ralph-docker/subscribers","subscription_url":"https://api.github.com/repos/szok/ralph-docker/subscription","commits_url":"https://api.github.com/repos/szok/ralph-docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/szok/ralph-docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/szok/ralph-docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/szok/ralph-docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/szok/ralph-docker/contents/{+path}","compare_url":"https://api.github.com/repos/szok/ralph-docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/szok/ralph-docker/merges","archive_url":"https://api.github.com/repos/szok/ralph-docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/szok/ralph-docker/downloads","issues_url":"https://api.github.com/repos/szok/ralph-docker/issues{/number}","pulls_url":"https://api.github.com/repos/szok/ralph-docker/pulls{/number}","milestones_url":"https://api.github.com/repos/szok/ralph-docker/milestones{/number}","notifications_url":"https://api.github.com/repos/szok/ralph-docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/szok/ralph-docker/labels{/name}","releases_url":"https://api.github.com/repos/szok/ralph-docker/releases{/id}","created_at":"2015-03-23T11:25:03Z","updated_at":"2015-03-23T10:57:19Z","pushed_at":"2015-03-24T19:56:49Z","git_url":"git://github.com/szok/ralph-docker.git","ssh_url":"git@github.com:szok/ralph-docker.git","clone_url":"https://github.com/szok/ralph-docker.git","svn_url":"https://github.com/szok/ralph-docker","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"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":"allegro:master","ref":"master","sha":"844ad8625fe6cdf0e60b9ac9b705df5c31d8fba7","user":{"login":"allegro","id":562236,"avatar_url":"https://avatars.githubusercontent.com/u/562236?v=3","gravatar_id":"","url":"https://api.github.com/users/allegro","html_url":"https://github.com/allegro","followers_url":"https://api.github.com/users/allegro/followers","following_url":"https://api.github.com/users/allegro/following{/other_user}","gists_url":"https://api.github.com/users/allegro/gists{/gist_id}","starred_url":"https://api.github.com/users/allegro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allegro/subscriptions","organizations_url":"https://api.github.com/users/allegro/orgs","repos_url":"https://api.github.com/users/allegro/repos","events_url":"https://api.github.com/users/allegro/events{/privacy}","received_events_url":"https://api.github.com/users/allegro/received_events","type":"Organization","site_admin":false},"repo":{"id":32726704,"name":"ralph-docker","full_name":"allegro/ralph-docker","owner":{"login":"allegro","id":562236,"avatar_url":"https://avatars.githubusercontent.com/u/562236?v=3","gravatar_id":"","url":"https://api.github.com/users/allegro","html_url":"https://github.com/allegro","followers_url":"https://api.github.com/users/allegro/followers","following_url":"https://api.github.com/users/allegro/following{/other_user}","gists_url":"https://api.github.com/users/allegro/gists{/gist_id}","starred_url":"https://api.github.com/users/allegro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allegro/subscriptions","organizations_url":"https://api.github.com/users/allegro/orgs","repos_url":"https://api.github.com/users/allegro/repos","events_url":"https://api.github.com/users/allegro/events{/privacy}","received_events_url":"https://api.github.com/users/allegro/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/allegro/ralph-docker","description":"Ralph docker image configuration","fork":false,"url":"https://api.github.com/repos/allegro/ralph-docker","forks_url":"https://api.github.com/repos/allegro/ralph-docker/forks","keys_url":"https://api.github.com/repos/allegro/ralph-docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/allegro/ralph-docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/allegro/ralph-docker/teams","hooks_url":"https://api.github.com/repos/allegro/ralph-docker/hooks","issue_events_url":"https://api.github.com/repos/allegro/ralph-docker/issues/events{/number}","events_url":"https://api.github.com/repos/allegro/ralph-docker/events","assignees_url":"https://api.github.com/repos/allegro/ralph-docker/assignees{/user}","branches_url":"https://api.github.com/repos/allegro/ralph-docker/branches{/branch}","tags_url":"https://api.github.com/repos/allegro/ralph-docker/tags","blobs_url":"https://api.github.com/repos/allegro/ralph-docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/allegro/ralph-docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/allegro/ralph-docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/allegro/ralph-docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/allegro/ralph-docker/statuses/{sha}","languages_url":"https://api.github.com/repos/allegro/ralph-docker/languages","stargazers_url":"https://api.github.com/repos/allegro/ralph-docker/stargazers","contributors_url":"https://api.github.com/repos/allegro/ralph-docker/contributors","subscribers_url":"https://api.github.com/repos/allegro/ralph-docker/subscribers","subscription_url":"https://api.github.com/repos/allegro/ralph-docker/subscription","commits_url":"https://api.github.com/repos/allegro/ralph-docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/allegro/ralph-docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/allegro/ralph-docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/allegro/ralph-docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/allegro/ralph-docker/contents/{+path}","compare_url":"https://api.github.com/repos/allegro/ralph-docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/allegro/ralph-docker/merges","archive_url":"https://api.github.com/repos/allegro/ralph-docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/allegro/ralph-docker/downloads","issues_url":"https://api.github.com/repos/allegro/ralph-docker/issues{/number}","pulls_url":"https://api.github.com/repos/allegro/ralph-docker/pulls{/number}","milestones_url":"https://api.github.com/repos/allegro/ralph-docker/milestones{/number}","notifications_url":"https://api.github.com/repos/allegro/ralph-docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/allegro/ralph-docker/labels{/name}","releases_url":"https://api.github.com/repos/allegro/ralph-docker/releases{/id}","created_at":"2015-03-23T10:57:19Z","updated_at":"2015-03-23T10:57:19Z","pushed_at":"2015-03-24T19:56:50Z","git_url":"git://github.com/allegro/ralph-docker.git","ssh_url":"git@github.com:allegro/ralph-docker.git","clone_url":"https://github.com/allegro/ralph-docker.git","svn_url":"https://github.com/allegro/ralph-docker","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/allegro/ralph-docker/pulls/1"},"html":{"href":"https://github.com/allegro/ralph-docker/pull/1"},"issue":{"href":"https://api.github.com/repos/allegro/ralph-docker/issues/1"},"comments":{"href":"https://api.github.com/repos/allegro/ralph-docker/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/allegro/ralph-docker/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/allegro/ralph-docker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/allegro/ralph-docker/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/allegro/ralph-docker/statuses/b2301b32bd8003c7ff906a2f3b7c747aa7ebfa03"}}}}