{"action":"created","comment":{"url":"https://api.github.com/repos/containers/image/pulls/comments/176672749","pull_request_review_id":106417757,"id":176672749,"diff_hunk":"@@ -0,0 +1,220 @@\n+package sysregistriesv2\n+\n+import (\n+\t\"fmt\"\n+\t\"net/url\"\n+\t\"strings\"\n+\n+\t\"github.com/BurntSushi/toml\"\n+\t\"github.com/containers/image/types\"\n+\t\"github.com/sirupsen/logrus\"\n+\t\"github.com/containers/image/docker/reference\"\n+\n+\t\"io/ioutil\"\n+\t\"path/filepath\"\n+)\n+\n+// systemRegistriesConfPath is the path to the system-wide registry configuration file\n+// and is used to add/subtract potential registries for obtaining images.\n+// You can override this at build time with\n+// -ldflags '-X github.com/containers/image/sysregistries.systemRegistriesConfPath=$your_path'\n+var systemRegistriesConfPath = builtinRegistriesConfPath\n+\n+// builtinRegistriesConfPath is the path to registry configuration file\n+// DO NOT change this, instead see systemRegistriesConfPath above.\n+const builtinRegistriesConfPath = \"/etc/containers/registries.conf\"\n+\n+// RegURL represents a Registry's URl.  This abstraction is required to\n+// unmarshal the non-primitive and non-local url.URL type when loading the\n+// toml config.","path":"pkg/sysregistriesv2/system_registries_v2.go","position":29,"original_position":29,"commit_id":"60887956d2493110f8e70a59326b0ce422ae9e03","original_commit_id":"60887956d2493110f8e70a59326b0ce422ae9e03","user":{"login":"vrothberg","id":11679875,"avatar_url":"https://avatars1.githubusercontent.com/u/11679875?v=4","gravatar_id":"","url":"https://api.github.com/users/vrothberg","html_url":"https://github.com/vrothberg","followers_url":"https://api.github.com/users/vrothberg/followers","following_url":"https://api.github.com/users/vrothberg/following{/other_user}","gists_url":"https://api.github.com/users/vrothberg/gists{/gist_id}","starred_url":"https://api.github.com/users/vrothberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vrothberg/subscriptions","organizations_url":"https://api.github.com/users/vrothberg/orgs","repos_url":"https://api.github.com/users/vrothberg/repos","events_url":"https://api.github.com/users/vrothberg/events{/privacy}","received_events_url":"https://api.github.com/users/vrothberg/received_events","type":"User","site_admin":false},"body":"I will look into this.","created_at":"2018-03-23T09:03:49Z","updated_at":"2018-03-23T09:03:49Z","html_url":"https://github.com/containers/image/pull/429#discussion_r176672749","pull_request_url":"https://api.github.com/repos/containers/image/pulls/429","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/containers/image/pulls/comments/176672749"},"html":{"href":"https://github.com/containers/image/pull/429#discussion_r176672749"},"pull_request":{"href":"https://api.github.com/repos/containers/image/pulls/429"}},"in_reply_to_id":176553392},"pull_request":{"url":"https://api.github.com/repos/containers/image/pulls/429","id":175906445,"html_url":"https://github.com/containers/image/pull/429","diff_url":"https://github.com/containers/image/pull/429.diff","patch_url":"https://github.com/containers/image/pull/429.patch","issue_url":"https://api.github.com/repos/containers/image/issues/429","number":429,"state":"open","locked":false,"title":"[WIP] sysregistries: support mirrors","user":{"login":"vrothberg","id":11679875,"avatar_url":"https://avatars1.githubusercontent.com/u/11679875?v=4","gravatar_id":"","url":"https://api.github.com/users/vrothberg","html_url":"https://github.com/vrothberg","followers_url":"https://api.github.com/users/vrothberg/followers","following_url":"https://api.github.com/users/vrothberg/following{/other_user}","gists_url":"https://api.github.com/users/vrothberg/gists{/gist_id}","starred_url":"https://api.github.com/users/vrothberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vrothberg/subscriptions","organizations_url":"https://api.github.com/users/vrothberg/orgs","repos_url":"https://api.github.com/users/vrothberg/repos","events_url":"https://api.github.com/users/vrothberg/events{/privacy}","received_events_url":"https://api.github.com/users/vrothberg/received_events","type":"User","site_admin":false},"body":"Note: still in the design phase.\r\n\r\n# TOML Configuration Example\r\n\r\n```toml\r\n[[registry]]\r\n  url = \"https://registry.com\"\r\n  [[registry.mirror]]\r\n    url = \"https://mirror-1.registry.com\"\r\n  [[registry.mirror]]\r\n    url = \"https://mirror-2.registry.com\"\r\n\r\n[[registry]]\r\n  url = \"https://blocked.registry.com\"\r\n  blocked = true\r\n\r\n[[registry]]\r\n  url = \"http://insecure.registry.com\"\r\n  insecure = true\r\n\r\n[[registry]]\r\n  url = \"https://untrusted.registry.com\"\r\n  insecure = true\r\n```\r\n\r\nCloses: https://github.com/containers/image/issues/397","created_at":"2018-03-19T13:55:46Z","updated_at":"2018-03-23T09:03:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5ec782dd79760de00b0ab8a2d315e8815e037eae","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/containers/image/pulls/429/commits","review_comments_url":"https://api.github.com/repos/containers/image/pulls/429/comments","review_comment_url":"https://api.github.com/repos/containers/image/pulls/comments{/number}","comments_url":"https://api.github.com/repos/containers/image/issues/429/comments","statuses_url":"https://api.github.com/repos/containers/image/statuses/60887956d2493110f8e70a59326b0ce422ae9e03","head":{"label":"vrothberg:mirror-support","ref":"mirror-support","sha":"60887956d2493110f8e70a59326b0ce422ae9e03","user":{"login":"vrothberg","id":11679875,"avatar_url":"https://avatars1.githubusercontent.com/u/11679875?v=4","gravatar_id":"","url":"https://api.github.com/users/vrothberg","html_url":"https://github.com/vrothberg","followers_url":"https://api.github.com/users/vrothberg/followers","following_url":"https://api.github.com/users/vrothberg/following{/other_user}","gists_url":"https://api.github.com/users/vrothberg/gists{/gist_id}","starred_url":"https://api.github.com/users/vrothberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vrothberg/subscriptions","organizations_url":"https://api.github.com/users/vrothberg/orgs","repos_url":"https://api.github.com/users/vrothberg/repos","events_url":"https://api.github.com/users/vrothberg/events{/privacy}","received_events_url":"https://api.github.com/users/vrothberg/received_events","type":"User","site_admin":false},"repo":{"id":116376947,"name":"image","full_name":"vrothberg/image","owner":{"login":"vrothberg","id":11679875,"avatar_url":"https://avatars1.githubusercontent.com/u/11679875?v=4","gravatar_id":"","url":"https://api.github.com/users/vrothberg","html_url":"https://github.com/vrothberg","followers_url":"https://api.github.com/users/vrothberg/followers","following_url":"https://api.github.com/users/vrothberg/following{/other_user}","gists_url":"https://api.github.com/users/vrothberg/gists{/gist_id}","starred_url":"https://api.github.com/users/vrothberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vrothberg/subscriptions","organizations_url":"https://api.github.com/users/vrothberg/orgs","repos_url":"https://api.github.com/users/vrothberg/repos","events_url":"https://api.github.com/users/vrothberg/events{/privacy}","received_events_url":"https://api.github.com/users/vrothberg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vrothberg/image","description":"Work with containers' images","fork":true,"url":"https://api.github.com/repos/vrothberg/image","forks_url":"https://api.github.com/repos/vrothberg/image/forks","keys_url":"https://api.github.com/repos/vrothberg/image/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vrothberg/image/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vrothberg/image/teams","hooks_url":"https://api.github.com/repos/vrothberg/image/hooks","issue_events_url":"https://api.github.com/repos/vrothberg/image/issues/events{/number}","events_url":"https://api.github.com/repos/vrothberg/image/events","assignees_url":"https://api.github.com/repos/vrothberg/image/assignees{/user}","branches_url":"https://api.github.com/repos/vrothberg/image/branches{/branch}","tags_url":"https://api.github.com/repos/vrothberg/image/tags","blobs_url":"https://api.github.com/repos/vrothberg/image/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vrothberg/image/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vrothberg/image/git/refs{/sha}","trees_url":"https://api.github.com/repos/vrothberg/image/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vrothberg/image/statuses/{sha}","languages_url":"https://api.github.com/repos/vrothberg/image/languages","stargazers_url":"https://api.github.com/repos/vrothberg/image/stargazers","contributors_url":"https://api.github.com/repos/vrothberg/image/contributors","subscribers_url":"https://api.github.com/repos/vrothberg/image/subscribers","subscription_url":"https://api.github.com/repos/vrothberg/image/subscription","commits_url":"https://api.github.com/repos/vrothberg/image/commits{/sha}","git_commits_url":"https://api.github.com/repos/vrothberg/image/git/commits{/sha}","comments_url":"https://api.github.com/repos/vrothberg/image/comments{/number}","issue_comment_url":"https://api.github.com/repos/vrothberg/image/issues/comments{/number}","contents_url":"https://api.github.com/repos/vrothberg/image/contents/{+path}","compare_url":"https://api.github.com/repos/vrothberg/image/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vrothberg/image/merges","archive_url":"https://api.github.com/repos/vrothberg/image/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vrothberg/image/downloads","issues_url":"https://api.github.com/repos/vrothberg/image/issues{/number}","pulls_url":"https://api.github.com/repos/vrothberg/image/pulls{/number}","milestones_url":"https://api.github.com/repos/vrothberg/image/milestones{/number}","notifications_url":"https://api.github.com/repos/vrothberg/image/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vrothberg/image/labels{/name}","releases_url":"https://api.github.com/repos/vrothberg/image/releases{/id}","deployments_url":"https://api.github.com/repos/vrothberg/image/deployments","created_at":"2018-01-05T11:14:25Z","updated_at":"2018-03-19T07:50:44Z","pushed_at":"2018-03-21T12:34:48Z","git_url":"git://github.com/vrothberg/image.git","ssh_url":"git@github.com:vrothberg/image.git","clone_url":"https://github.com/vrothberg/image.git","svn_url":"https://github.com/vrothberg/image","homepage":"","size":3950,"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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"containers:master","ref":"master","sha":"b327f751c16e4a189fdcde4ea36be67cc964c605","user":{"login":"containers","id":5874934,"avatar_url":"https://avatars3.githubusercontent.com/u/5874934?v=4","gravatar_id":"","url":"https://api.github.com/users/containers","html_url":"https://github.com/containers","followers_url":"https://api.github.com/users/containers/followers","following_url":"https://api.github.com/users/containers/following{/other_user}","gists_url":"https://api.github.com/users/containers/gists{/gist_id}","starred_url":"https://api.github.com/users/containers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/containers/subscriptions","organizations_url":"https://api.github.com/users/containers/orgs","repos_url":"https://api.github.com/users/containers/repos","events_url":"https://api.github.com/users/containers/events{/privacy}","received_events_url":"https://api.github.com/users/containers/received_events","type":"Organization","site_admin":false},"repo":{"id":61739430,"name":"image","full_name":"containers/image","owner":{"login":"containers","id":5874934,"avatar_url":"https://avatars3.githubusercontent.com/u/5874934?v=4","gravatar_id":"","url":"https://api.github.com/users/containers","html_url":"https://github.com/containers","followers_url":"https://api.github.com/users/containers/followers","following_url":"https://api.github.com/users/containers/following{/other_user}","gists_url":"https://api.github.com/users/containers/gists{/gist_id}","starred_url":"https://api.github.com/users/containers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/containers/subscriptions","organizations_url":"https://api.github.com/users/containers/orgs","repos_url":"https://api.github.com/users/containers/repos","events_url":"https://api.github.com/users/containers/events{/privacy}","received_events_url":"https://api.github.com/users/containers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/containers/image","description":"Work with containers' images","fork":false,"url":"https://api.github.com/repos/containers/image","forks_url":"https://api.github.com/repos/containers/image/forks","keys_url":"https://api.github.com/repos/containers/image/keys{/key_id}","collaborators_url":"https://api.github.com/repos/containers/image/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/containers/image/teams","hooks_url":"https://api.github.com/repos/containers/image/hooks","issue_events_url":"https://api.github.com/repos/containers/image/issues/events{/number}","events_url":"https://api.github.com/repos/containers/image/events","assignees_url":"https://api.github.com/repos/containers/image/assignees{/user}","branches_url":"https://api.github.com/repos/containers/image/branches{/branch}","tags_url":"https://api.github.com/repos/containers/image/tags","blobs_url":"https://api.github.com/repos/containers/image/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/containers/image/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/containers/image/git/refs{/sha}","trees_url":"https://api.github.com/repos/containers/image/git/trees{/sha}","statuses_url":"https://api.github.com/repos/containers/image/statuses/{sha}","languages_url":"https://api.github.com/repos/containers/image/languages","stargazers_url":"https://api.github.com/repos/containers/image/stargazers","contributors_url":"https://api.github.com/repos/containers/image/contributors","subscribers_url":"https://api.github.com/repos/containers/image/subscribers","subscription_url":"https://api.github.com/repos/containers/image/subscription","commits_url":"https://api.github.com/repos/containers/image/commits{/sha}","git_commits_url":"https://api.github.com/repos/containers/image/git/commits{/sha}","comments_url":"https://api.github.com/repos/containers/image/comments{/number}","issue_comment_url":"https://api.github.com/repos/containers/image/issues/comments{/number}","contents_url":"https://api.github.com/repos/containers/image/contents/{+path}","compare_url":"https://api.github.com/repos/containers/image/compare/{base}...{head}","merges_url":"https://api.github.com/repos/containers/image/merges","archive_url":"https://api.github.com/repos/containers/image/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/containers/image/downloads","issues_url":"https://api.github.com/repos/containers/image/issues{/number}","pulls_url":"https://api.github.com/repos/containers/image/pulls{/number}","milestones_url":"https://api.github.com/repos/containers/image/milestones{/number}","notifications_url":"https://api.github.com/repos/containers/image/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/containers/image/labels{/name}","releases_url":"https://api.github.com/repos/containers/image/releases{/id}","deployments_url":"https://api.github.com/repos/containers/image/deployments","created_at":"2016-06-22T17:46:41Z","updated_at":"2018-03-21T19:15:44Z","pushed_at":"2018-03-21T20:37:51Z","git_url":"git://github.com/containers/image.git","ssh_url":"git@github.com:containers/image.git","clone_url":"https://github.com/containers/image.git","svn_url":"https://github.com/containers/image","homepage":"","size":3946,"stargazers_count":142,"watchers_count":142,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":73,"mirror_url":null,"archived":false,"open_issues_count":58,"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":73,"open_issues":58,"watchers":142,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/containers/image/pulls/429"},"html":{"href":"https://github.com/containers/image/pull/429"},"issue":{"href":"https://api.github.com/repos/containers/image/issues/429"},"comments":{"href":"https://api.github.com/repos/containers/image/issues/429/comments"},"review_comments":{"href":"https://api.github.com/repos/containers/image/pulls/429/comments"},"review_comment":{"href":"https://api.github.com/repos/containers/image/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/containers/image/pulls/429/commits"},"statuses":{"href":"https://api.github.com/repos/containers/image/statuses/60887956d2493110f8e70a59326b0ce422ae9e03"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"vrothberg"}}