{"action":"created","comment":{"url":"https://api.github.com/repos/projectatomic/buildah/pulls/comments/187708119","pull_request_review_id":119549884,"id":187708119,"diff_hunk":"@@ -0,0 +1,81 @@\n+#!/bin/bash \n+\n+# author : ipbabble\n+# Assumptions install buildah, podman & docker\n+# Do NOT start the docker deamon\n+# Set some of the variables below\n+\n+demoimg=dockercompatibilitydemo\n+quayuser=ipbabble\n+myname=\"William Henry\"\n+distro=fedora\n+distrorelease=28\n+pkgmgr=dnf   # switch to yum if using yum \n+\n+#Setting up some colors for helping read the demo 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 \"Using ${red}RED${reset} to introduce Docker commands\"\n+\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 ${distro}${reset}\"\n+newcontainer=$(buildah from ${distro})\n+read -p \"${green}Update packages and clean all ${reset}\"\n+buildah run $newcontainer -- ${pkgmgr} -y update && ${pkgmgr} -y clean all\n+read -p \"${green}Install nginx${reset}\"\n+buildah run $newcontainer -- ${pkgmgr} -y install nginx && ${pkgmgr} -y clean all \n+read -p \"${green}Make some nginx config and home page changes ${reset}\"\n+buildah run $newcontainer bash -c 'echo \"daemon off;\" >> /etc/nginx/nginx.conf'\n+buildah run $newcontainer bash -c 'echo \"nginx on OCI Fedora image, built using Buildah\" > /usr/share/nginx/html/index.html'\n+read -p \"${green}Use buildah config to expose the port and set the entrypoint${reset}\"\n+buildah config --port 80 --entrypoint /usr/sbin/nginx $newcontainer\n+read -p \"${green}Set other meta data using buildah config${reset}\"\n+buildah config --created-by \"${quayuser}\"  $newcontainer\n+buildah config --author \"${myname} @${quayuser}\" --label name=$demoimg $newcontainer\n+read -p \"${green}Inspect the container image meta data${yellow}\"\n+buildah inspect $newcontainer\n+read -p \"${green}Commit the container to an OCI image called ${demoimg}.${reset}\"\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+containernum=$(podman run -d -p 80:80 $demoimg) \n+read -p \"${cyan}Check that nginx is up and running with our new page${reset}\"\n+curl localhost\n+read -p \"${blue}Stop the container and rm it${reset}\"\n+podman ps                                                                                   \n+podman stop $containernum                                                                            \n+podman rm $containernum                                                                              \n+read -p \"${cyan}Check that nginx is down${reset}\"\n+curl localhost\n+read -p \"${cyan}Start the Docker daemon. Using restart incase it is already started${reset}\"\n+systemctl restart docker\n+read -p \"${red}List the Docker images in the repository - should be empty${reset}\"\n+docker images                                                                          \n+read -p \"${blue}Push the image to the local Docker repository using docker-daemon${reset}\"\n+podman push $demoimg docker-daemon:$quayuser/dockercompatibilitydemo:latest       \n+read -p \"${red}List the Docker images in the repository${reset}\"\n+docker images                                                                          \n+read -p \"${red}Start the container from the new Docker repo image${reset}\"\n+dockercontainer=$(docker run -d -p 80:80 $quayuser/$demoimg)\n+read -p \"$cyan}Check that nginx is up and running with our new page${reset}\"\n+curl localhost\n+read -p \"${red}Stop the container and rm it${reset}\"\n+docker rm $dockercontainer                                                                            \n+docker rm $dockercontainer\n+read -p \"$cyan}Stop Docker${reset}\"","path":"demos/docker-compatibility-demo.sh","position":79,"original_position":79,"commit_id":"fdd2ec79116f86cdbdd0bd453aa2c4a03aed055e","original_commit_id":"fdd2ec79116f86cdbdd0bd453aa2c4a03aed055e","user":{"login":"TomSweeneyRedHat","id":25613829,"avatar_url":"https://avatars3.githubusercontent.com/u/25613829?v=4","gravatar_id":"","url":"https://api.github.com/users/TomSweeneyRedHat","html_url":"https://github.com/TomSweeneyRedHat","followers_url":"https://api.github.com/users/TomSweeneyRedHat/followers","following_url":"https://api.github.com/users/TomSweeneyRedHat/following{/other_user}","gists_url":"https://api.github.com/users/TomSweeneyRedHat/gists{/gist_id}","starred_url":"https://api.github.com/users/TomSweeneyRedHat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomSweeneyRedHat/subscriptions","organizations_url":"https://api.github.com/users/TomSweeneyRedHat/orgs","repos_url":"https://api.github.com/users/TomSweeneyRedHat/repos","events_url":"https://api.github.com/users/TomSweeneyRedHat/events{/privacy}","received_events_url":"https://api.github.com/users/TomSweeneyRedHat/received_events","type":"User","site_admin":false},"body":"\"cyan}\" to \"{cyan}\" here too.","created_at":"2018-05-11T19:14:43Z","updated_at":"2018-05-11T19:14:43Z","html_url":"https://github.com/projectatomic/buildah/pull/677#discussion_r187708119","pull_request_url":"https://api.github.com/repos/projectatomic/buildah/pulls/677","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/projectatomic/buildah/pulls/comments/187708119"},"html":{"href":"https://github.com/projectatomic/buildah/pull/677#discussion_r187708119"},"pull_request":{"href":"https://api.github.com/repos/projectatomic/buildah/pulls/677"}}},"pull_request":{"url":"https://api.github.com/repos/projectatomic/buildah/pulls/677","id":187511176,"html_url":"https://github.com/projectatomic/buildah/pull/677","diff_url":"https://github.com/projectatomic/buildah/pull/677.diff","patch_url":"https://github.com/projectatomic/buildah/pull/677.patch","issue_url":"https://api.github.com/repos/projectatomic/buildah/issues/677","number":677,"state":"open","locked":false,"title":"Add a docker compatibility demo","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":"Signed-off-by: William Henry @ipbabble <whenry@redhat.com>","created_at":"2018-05-11T16:27:43Z","updated_at":"2018-05-11T19:14:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"109822d33ac7b269c1c543b693694fe89b0f1369","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/projectatomic/buildah/pulls/677/commits","review_comments_url":"https://api.github.com/repos/projectatomic/buildah/pulls/677/comments","review_comment_url":"https://api.github.com/repos/projectatomic/buildah/pulls/comments{/number}","comments_url":"https://api.github.com/repos/projectatomic/buildah/issues/677/comments","statuses_url":"https://api.github.com/repos/projectatomic/buildah/statuses/fdd2ec79116f86cdbdd0bd453aa2c4a03aed055e","head":{"label":"ipbabble:dockerdemo","ref":"dockerdemo","sha":"fdd2ec79116f86cdbdd0bd453aa2c4a03aed055e","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":133059145,"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 that 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":"2018-05-11T15:47:57Z","updated_at":"2018-05-11T15:47:59Z","pushed_at":"2018-05-11T18:55:41Z","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":14031,"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":"b9a1041b1823b556b0fd9c14928055726cc473e5","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-11T18:20:41Z","pushed_at":"2018-05-11T18:55:43Z","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":14037,"stargazers_count":583,"watchers_count":583,"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":583,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/projectatomic/buildah/pulls/677"},"html":{"href":"https://github.com/projectatomic/buildah/pull/677"},"issue":{"href":"https://api.github.com/repos/projectatomic/buildah/issues/677"},"comments":{"href":"https://api.github.com/repos/projectatomic/buildah/issues/677/comments"},"review_comments":{"href":"https://api.github.com/repos/projectatomic/buildah/pulls/677/comments"},"review_comment":{"href":"https://api.github.com/repos/projectatomic/buildah/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/projectatomic/buildah/pulls/677/commits"},"statuses":{"href":"https://api.github.com/repos/projectatomic/buildah/statuses/fdd2ec79116f86cdbdd0bd453aa2c4a03aed055e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"TomSweeneyRedHat"}}