{"action":"created","comment":{"url":"https://api.github.com/repos/projectatomic/buildah/pulls/comments/187401842","pull_request_review_id":119176151,"id":187401842,"diff_hunk":"@@ -0,0 +1,78 @@\n+#!/bin/bash \n+\n+# author : ipbabble\n+# Assumptions install buildah and podman\n+# login to Quay.io using podman if you want to see the image push\n+#   otherwise it will just fail the last step and no biggy.\n+#   podman login quay.io\n+# Set some of the variables below\n+\n+demoimg=myshdemo\n+quayuser=ipbabble\n+myname=WilliamHenry\n+fedorarelease=28\n+\n+#Setting up some colors for helping read the dmeo output\n+bold=$(tput bold)\n+red=$(tput setaf 1)\n+green=$(tput setaf 2)\n+yellow=$(tput setaf 3)\n+blue=$(tput setaf 4)\n+cyan=$(tput setaf 6)\n+reset=$(tput sgr0)\n+\n+echo -e \"Using ${green}GREEN${reset} to introduce Buildah steps\"\n+echo -e \"Using ${yellow}YELLOW${reset} to introduce code\"\n+echo -e \"Using ${blue}BLUE${reset} to introduce Podman steps\"\n+echo -e \"Using ${cyan}CYAN${reset} to introduce bash commands\"\n+echo -e \"Building an image called ${demoimg}\"\n+read -p \"${green}Start of the script${reset}\"\n+\n+set -x\n+read -p \"${green}Create a new container on disk from scratch${reset}\"\n+newcontainer=$(buildah from scratch)\n+read -p \"${green}Mount the root directory of the new scratch container${reset}\"\n+scratchmnt=$(buildah mount $newcontainer)\n+read -p \"${cyan}Lets see what is in scratchmnt${reset}\"\n+ls $scratchmnt\n+echo -e \"${red}Note that the root of the scratch container is EMPTY!${reset}\"\n+read -p \"${cyan}Time to install some basic bash capabilities: coreutils and bash packages${reset}\"\n+dnf install --installroot $scratchmnt --release ${fedorarelease} bash coreutils --setopt install_weak_deps=false -y\n+read -p \"${cyan}Clean up the packages${reset}\"\n+dnf clean --installroot $scratchmnt --release ${fedorarelease} all\n+read -p \"${green}Run the shell and see what is inside${rest}\"\n+buildah run $newcontainer bash\n+read -p \"${cyan}Let's look at the program${yellow}\"\n+FILE=./runecho.sh\n+/bin/cat <<EOM >$FILE\n+#!/bin/bash\n+for i in {1..9};\n+do\n+    echo \"This is a new cloud native container from ipbabble [\" \\$i \"]\"\n+done\n+EOM\n+chmod +x $FILE\n+cat $FILE\n+read -p \"${green}Copy program into the container and lets ls to see it's there${reset}\"\n+buildah copy $newcontainer $FILE /usr/bin\n+ls -al $scratchmnt/usr/bin/*.sh\n+read -p \"${green}Run the container using Buildah${reset}\"\n+buildah run $newcontainer /usr/bin/runecho.sh\n+read -p \"${green}Make the container run the program by default when container is run${reset}\"\n+buildah config --entrypoint /usr/bin/runecho.sh $newcontainer\n+read -p \"${green}Set some config information for the container image${reset}\"\n+buildah config --author \"${myname}\" --created-by \"${quayuser}\" --label name=${demoimg} $newcontainer\n+read -p \"${green}Inspect the meta data${yellow}\"\n+buildah inspect $newcontainer\n+read -p \"${green}Unmount the container and commit to an image called ${demoimg}.${reset}\"\n+buildah unmount $newcontainer\n+buildah commit $newcontainer $demoimg\n+read -p \"${green}List the images we have.${reset}\"\n+buildah images\n+read -p \"${blue}Run the container using Podman.${reset}\"\n+podman run $demoimg","path":"demos/buildah-scratch-demo.sh","position":73,"original_position":73,"commit_id":"3d2909ad638ffcdfb6fd5868321ec1d4f11870b0","original_commit_id":"3d2909ad638ffcdfb6fd5868321ec1d4f11870b0","user":{"login":"ipbabble","id":1304961,"avatar_url":"https://avatars0.githubusercontent.com/u/1304961?v=4","gravatar_id":"","url":"https://api.github.com/users/ipbabble","html_url":"https://github.com/ipbabble","followers_url":"https://api.github.com/users/ipbabble/followers","following_url":"https://api.github.com/users/ipbabble/following{/other_user}","gists_url":"https://api.github.com/users/ipbabble/gists{/gist_id}","starred_url":"https://api.github.com/users/ipbabble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipbabble/subscriptions","organizations_url":"https://api.github.com/users/ipbabble/orgs","repos_url":"https://api.github.com/users/ipbabble/repos","events_url":"https://api.github.com/users/ipbabble/events{/privacy}","received_events_url":"https://api.github.com/users/ipbabble/received_events","type":"User","site_admin":false},"body":"Me too. ","created_at":"2018-05-10T17:34:31Z","updated_at":"2018-05-10T17:34:31Z","html_url":"https://github.com/projectatomic/buildah/pull/668#discussion_r187401842","pull_request_url":"https://api.github.com/repos/projectatomic/buildah/pulls/668","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/projectatomic/buildah/pulls/comments/187401842"},"html":{"href":"https://github.com/projectatomic/buildah/pull/668#discussion_r187401842"},"pull_request":{"href":"https://api.github.com/repos/projectatomic/buildah/pulls/668"}},"in_reply_to_id":187047089},"pull_request":{"url":"https://api.github.com/repos/projectatomic/buildah/pulls/668","id":186776704,"html_url":"https://github.com/projectatomic/buildah/pull/668","diff_url":"https://github.com/projectatomic/buildah/pull/668.diff","patch_url":"https://github.com/projectatomic/buildah/pull/668.patch","issue_url":"https://api.github.com/repos/projectatomic/buildah/issues/668","number":668,"state":"open","locked":false,"title":"New demos directory with a new build from scratch demo script and a d…","user":{"login":"ipbabble","id":1304961,"avatar_url":"https://avatars0.githubusercontent.com/u/1304961?v=4","gravatar_id":"","url":"https://api.github.com/users/ipbabble","html_url":"https://github.com/ipbabble","followers_url":"https://api.github.com/users/ipbabble/followers","following_url":"https://api.github.com/users/ipbabble/following{/other_user}","gists_url":"https://api.github.com/users/ipbabble/gists{/gist_id}","starred_url":"https://api.github.com/users/ipbabble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipbabble/subscriptions","organizations_url":"https://api.github.com/users/ipbabble/orgs","repos_url":"https://api.github.com/users/ipbabble/repos","events_url":"https://api.github.com/users/ipbabble/events{/privacy}","received_events_url":"https://api.github.com/users/ipbabble/received_events","type":"User","site_admin":false},"body":"…emos dir README.md file\r\n\r\nA new demos dir. \r\nA README.md file for that dir.\r\nA buildah-scratch-demo.sh\r\n\r\nSigned-off-by: William Henry @ipbabble <whenry@redhat.com>","created_at":"2018-05-08T22:51:09Z","updated_at":"2018-05-10T17:34:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aaf163f9892c132cd6c8cfd54bff3a2e3d431447","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/projectatomic/buildah/pulls/668/commits","review_comments_url":"https://api.github.com/repos/projectatomic/buildah/pulls/668/comments","review_comment_url":"https://api.github.com/repos/projectatomic/buildah/pulls/comments{/number}","comments_url":"https://api.github.com/repos/projectatomic/buildah/issues/668/comments","statuses_url":"https://api.github.com/repos/projectatomic/buildah/statuses/3d2909ad638ffcdfb6fd5868321ec1d4f11870b0","head":{"label":"ipbabble:shdemo","ref":"shdemo","sha":"3d2909ad638ffcdfb6fd5868321ec1d4f11870b0","user":{"login":"ipbabble","id":1304961,"avatar_url":"https://avatars0.githubusercontent.com/u/1304961?v=4","gravatar_id":"","url":"https://api.github.com/users/ipbabble","html_url":"https://github.com/ipbabble","followers_url":"https://api.github.com/users/ipbabble/followers","following_url":"https://api.github.com/users/ipbabble/following{/other_user}","gists_url":"https://api.github.com/users/ipbabble/gists{/gist_id}","starred_url":"https://api.github.com/users/ipbabble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipbabble/subscriptions","organizations_url":"https://api.github.com/users/ipbabble/orgs","repos_url":"https://api.github.com/users/ipbabble/repos","events_url":"https://api.github.com/users/ipbabble/events{/privacy}","received_events_url":"https://api.github.com/users/ipbabble/received_events","type":"User","site_admin":false},"repo":{"id":112402409,"name":"buildah","full_name":"ipbabble/buildah","owner":{"login":"ipbabble","id":1304961,"avatar_url":"https://avatars0.githubusercontent.com/u/1304961?v=4","gravatar_id":"","url":"https://api.github.com/users/ipbabble","html_url":"https://github.com/ipbabble","followers_url":"https://api.github.com/users/ipbabble/followers","following_url":"https://api.github.com/users/ipbabble/following{/other_user}","gists_url":"https://api.github.com/users/ipbabble/gists{/gist_id}","starred_url":"https://api.github.com/users/ipbabble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipbabble/subscriptions","organizations_url":"https://api.github.com/users/ipbabble/orgs","repos_url":"https://api.github.com/users/ipbabble/repos","events_url":"https://api.github.com/users/ipbabble/events{/privacy}","received_events_url":"https://api.github.com/users/ipbabble/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ipbabble/buildah","description":"A tool which facilitates building OCI images","fork":true,"url":"https://api.github.com/repos/ipbabble/buildah","forks_url":"https://api.github.com/repos/ipbabble/buildah/forks","keys_url":"https://api.github.com/repos/ipbabble/buildah/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ipbabble/buildah/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ipbabble/buildah/teams","hooks_url":"https://api.github.com/repos/ipbabble/buildah/hooks","issue_events_url":"https://api.github.com/repos/ipbabble/buildah/issues/events{/number}","events_url":"https://api.github.com/repos/ipbabble/buildah/events","assignees_url":"https://api.github.com/repos/ipbabble/buildah/assignees{/user}","branches_url":"https://api.github.com/repos/ipbabble/buildah/branches{/branch}","tags_url":"https://api.github.com/repos/ipbabble/buildah/tags","blobs_url":"https://api.github.com/repos/ipbabble/buildah/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ipbabble/buildah/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ipbabble/buildah/git/refs{/sha}","trees_url":"https://api.github.com/repos/ipbabble/buildah/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ipbabble/buildah/statuses/{sha}","languages_url":"https://api.github.com/repos/ipbabble/buildah/languages","stargazers_url":"https://api.github.com/repos/ipbabble/buildah/stargazers","contributors_url":"https://api.github.com/repos/ipbabble/buildah/contributors","subscribers_url":"https://api.github.com/repos/ipbabble/buildah/subscribers","subscription_url":"https://api.github.com/repos/ipbabble/buildah/subscription","commits_url":"https://api.github.com/repos/ipbabble/buildah/commits{/sha}","git_commits_url":"https://api.github.com/repos/ipbabble/buildah/git/commits{/sha}","comments_url":"https://api.github.com/repos/ipbabble/buildah/comments{/number}","issue_comment_url":"https://api.github.com/repos/ipbabble/buildah/issues/comments{/number}","contents_url":"https://api.github.com/repos/ipbabble/buildah/contents/{+path}","compare_url":"https://api.github.com/repos/ipbabble/buildah/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ipbabble/buildah/merges","archive_url":"https://api.github.com/repos/ipbabble/buildah/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ipbabble/buildah/downloads","issues_url":"https://api.github.com/repos/ipbabble/buildah/issues{/number}","pulls_url":"https://api.github.com/repos/ipbabble/buildah/pulls{/number}","milestones_url":"https://api.github.com/repos/ipbabble/buildah/milestones{/number}","notifications_url":"https://api.github.com/repos/ipbabble/buildah/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ipbabble/buildah/labels{/name}","releases_url":"https://api.github.com/repos/ipbabble/buildah/releases{/id}","deployments_url":"https://api.github.com/repos/ipbabble/buildah/deployments","created_at":"2017-11-28T23:44:29Z","updated_at":"2017-11-28T23:44:31Z","pushed_at":"2018-05-09T03:54:20Z","git_url":"git://github.com/ipbabble/buildah.git","ssh_url":"git@github.com:ipbabble/buildah.git","clone_url":"https://github.com/ipbabble/buildah.git","svn_url":"https://github.com/ipbabble/buildah","homepage":"","size":13982,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"projectatomic:master","ref":"master","sha":"fe204e42ee80a3760dd2d4c681bad9eb0e7b046d","user":{"login":"projectatomic","id":6852258,"avatar_url":"https://avatars1.githubusercontent.com/u/6852258?v=4","gravatar_id":"","url":"https://api.github.com/users/projectatomic","html_url":"https://github.com/projectatomic","followers_url":"https://api.github.com/users/projectatomic/followers","following_url":"https://api.github.com/users/projectatomic/following{/other_user}","gists_url":"https://api.github.com/users/projectatomic/gists{/gist_id}","starred_url":"https://api.github.com/users/projectatomic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectatomic/subscriptions","organizations_url":"https://api.github.com/users/projectatomic/orgs","repos_url":"https://api.github.com/users/projectatomic/repos","events_url":"https://api.github.com/users/projectatomic/events{/privacy}","received_events_url":"https://api.github.com/users/projectatomic/received_events","type":"Organization","site_admin":false},"repo":{"id":80134675,"name":"buildah","full_name":"projectatomic/buildah","owner":{"login":"projectatomic","id":6852258,"avatar_url":"https://avatars1.githubusercontent.com/u/6852258?v=4","gravatar_id":"","url":"https://api.github.com/users/projectatomic","html_url":"https://github.com/projectatomic","followers_url":"https://api.github.com/users/projectatomic/followers","following_url":"https://api.github.com/users/projectatomic/following{/other_user}","gists_url":"https://api.github.com/users/projectatomic/gists{/gist_id}","starred_url":"https://api.github.com/users/projectatomic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectatomic/subscriptions","organizations_url":"https://api.github.com/users/projectatomic/orgs","repos_url":"https://api.github.com/users/projectatomic/repos","events_url":"https://api.github.com/users/projectatomic/events{/privacy}","received_events_url":"https://api.github.com/users/projectatomic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projectatomic/buildah","description":"A tool that facilitates building OCI images","fork":false,"url":"https://api.github.com/repos/projectatomic/buildah","forks_url":"https://api.github.com/repos/projectatomic/buildah/forks","keys_url":"https://api.github.com/repos/projectatomic/buildah/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projectatomic/buildah/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projectatomic/buildah/teams","hooks_url":"https://api.github.com/repos/projectatomic/buildah/hooks","issue_events_url":"https://api.github.com/repos/projectatomic/buildah/issues/events{/number}","events_url":"https://api.github.com/repos/projectatomic/buildah/events","assignees_url":"https://api.github.com/repos/projectatomic/buildah/assignees{/user}","branches_url":"https://api.github.com/repos/projectatomic/buildah/branches{/branch}","tags_url":"https://api.github.com/repos/projectatomic/buildah/tags","blobs_url":"https://api.github.com/repos/projectatomic/buildah/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projectatomic/buildah/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projectatomic/buildah/git/refs{/sha}","trees_url":"https://api.github.com/repos/projectatomic/buildah/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projectatomic/buildah/statuses/{sha}","languages_url":"https://api.github.com/repos/projectatomic/buildah/languages","stargazers_url":"https://api.github.com/repos/projectatomic/buildah/stargazers","contributors_url":"https://api.github.com/repos/projectatomic/buildah/contributors","subscribers_url":"https://api.github.com/repos/projectatomic/buildah/subscribers","subscription_url":"https://api.github.com/repos/projectatomic/buildah/subscription","commits_url":"https://api.github.com/repos/projectatomic/buildah/commits{/sha}","git_commits_url":"https://api.github.com/repos/projectatomic/buildah/git/commits{/sha}","comments_url":"https://api.github.com/repos/projectatomic/buildah/comments{/number}","issue_comment_url":"https://api.github.com/repos/projectatomic/buildah/issues/comments{/number}","contents_url":"https://api.github.com/repos/projectatomic/buildah/contents/{+path}","compare_url":"https://api.github.com/repos/projectatomic/buildah/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projectatomic/buildah/merges","archive_url":"https://api.github.com/repos/projectatomic/buildah/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projectatomic/buildah/downloads","issues_url":"https://api.github.com/repos/projectatomic/buildah/issues{/number}","pulls_url":"https://api.github.com/repos/projectatomic/buildah/pulls{/number}","milestones_url":"https://api.github.com/repos/projectatomic/buildah/milestones{/number}","notifications_url":"https://api.github.com/repos/projectatomic/buildah/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projectatomic/buildah/labels{/name}","releases_url":"https://api.github.com/repos/projectatomic/buildah/releases{/id}","deployments_url":"https://api.github.com/repos/projectatomic/buildah/deployments","created_at":"2017-01-26T16:59:13Z","updated_at":"2018-05-10T16:32:59Z","pushed_at":"2018-05-10T16:32:57Z","git_url":"git://github.com/projectatomic/buildah.git","ssh_url":"git@github.com:projectatomic/buildah.git","clone_url":"https://github.com/projectatomic/buildah.git","svn_url":"https://github.com/projectatomic/buildah","homepage":"","size":14026,"stargazers_count":574,"watchers_count":574,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":81,"mirror_url":null,"archived":false,"open_issues_count":61,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":81,"open_issues":61,"watchers":574,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/projectatomic/buildah/pulls/668"},"html":{"href":"https://github.com/projectatomic/buildah/pull/668"},"issue":{"href":"https://api.github.com/repos/projectatomic/buildah/issues/668"},"comments":{"href":"https://api.github.com/repos/projectatomic/buildah/issues/668/comments"},"review_comments":{"href":"https://api.github.com/repos/projectatomic/buildah/pulls/668/comments"},"review_comment":{"href":"https://api.github.com/repos/projectatomic/buildah/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/projectatomic/buildah/pulls/668/commits"},"statuses":{"href":"https://api.github.com/repos/projectatomic/buildah/statuses/3d2909ad638ffcdfb6fd5868321ec1d4f11870b0"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ipbabble"}}