{"action":"closed","number":5321,"pull_request":{"url":"https://api.github.com/repos/gogs/gogs/pulls/5321","id":198457730,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4NDU3NzMw","html_url":"https://github.com/gogs/gogs/pull/5321","diff_url":"https://github.com/gogs/gogs/pull/5321.diff","patch_url":"https://github.com/gogs/gogs/pull/5321.patch","issue_url":"https://api.github.com/repos/gogs/gogs/issues/5321","number":5321,"state":"closed","locked":false,"title":"add new Dockerfile.docker-ce for docker-ce(>=v17.06) to  build docker image","user":{"login":"winsx","id":1683704,"node_id":"MDQ6VXNlcjE2ODM3MDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1683704?v=4","gravatar_id":"","url":"https://api.github.com/users/winsx","html_url":"https://github.com/winsx","followers_url":"https://api.github.com/users/winsx/followers","following_url":"https://api.github.com/users/winsx/following{/other_user}","gists_url":"https://api.github.com/users/winsx/gists{/gist_id}","starred_url":"https://api.github.com/users/winsx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/winsx/subscriptions","organizations_url":"https://api.github.com/users/winsx/orgs","repos_url":"https://api.github.com/users/winsx/repos","events_url":"https://api.github.com/users/winsx/events{/privacy}","received_events_url":"https://api.github.com/users/winsx/received_events","type":"User","site_admin":false},"body":"Docker-CE can be given to a new build stage by adding `AS` name to the` FROM` instruction sine release version of v17.06. The Dockerfile's `FROM` instruction like below:\r\n### FROM\r\n```\r\nFROM <image> [AS <name>]\r\n```\r\nOr\r\n```\r\nFROM <image>[:<tag>] [AS <name>]\r\n```\r\nOr\r\n```\r\nFROM <image>[@<digest>] [AS <name>]\r\n```\r\n* Optionally a name can be given to a new build stage by adding AS name to the FROM instruction. The name can be used in subsequent FROM and COPY --from=<name|index> instructions to refer to the image built in this stage.\r\n\r\nFind Docker-ce official document [here](https://docs.docker.com/v17.06/engine/reference/builder/#from 'Docker official Document').\r\n\r\nYou can use this patch to build docker image if  docker-ce that version >=v17.06 is installed:\r\n```\r\n>docker version\r\nClient:\r\n Version:      18.03.1-ce\r\n API version:  1.37\r\n Go version:   go1.9.5\r\n Git commit:   9ee9f40\r\n Built:        Thu Apr 26 07:20:16 2018\r\n OS/Arch:      linux/amd64\r\n Experimental: false\r\n Orchestrator: swarm\r\n\r\nServer:\r\n Engine:\r\n  Version:      18.03.1-ce\r\n  API version:  1.37 (minimum version 1.12)\r\n  Go version:   go1.9.5\r\n  Git commit:   9ee9f40\r\n  Built:        Thu Apr 26 07:23:58 2018\r\n  OS/Arch:      linux/amd64\r\n  Experimental: false\r\n```\r\n* Build docker image\r\n```\r\n>cd $GOPATH/src/github.com/gogs/gogs\r\n>docker build -t <your/image-tag> -f Dockerfile.docker-ce .\r\n```\r\n\r\n\r\n","created_at":"2018-06-30T03:38:56Z","updated_at":"2018-06-30T03:41:07Z","closed_at":"2018-06-30T03:41:07Z","merged_at":null,"merge_commit_sha":"9f961407c85489ad73da7debfc3ea20fc6875187","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/gogs/gogs/pulls/5321/commits","review_comments_url":"https://api.github.com/repos/gogs/gogs/pulls/5321/comments","review_comment_url":"https://api.github.com/repos/gogs/gogs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gogs/gogs/issues/5321/comments","statuses_url":"https://api.github.com/repos/gogs/gogs/statuses/6400906380c482444d14320476effdbace7e2e7d","head":{"label":"alimy:docker-ce","ref":"docker-ce","sha":"6400906380c482444d14320476effdbace7e2e7d","user":{"login":"alimy","id":10525842,"node_id":"MDQ6VXNlcjEwNTI1ODQy","avatar_url":"https://avatars0.githubusercontent.com/u/10525842?v=4","gravatar_id":"","url":"https://api.github.com/users/alimy","html_url":"https://github.com/alimy","followers_url":"https://api.github.com/users/alimy/followers","following_url":"https://api.github.com/users/alimy/following{/other_user}","gists_url":"https://api.github.com/users/alimy/gists{/gist_id}","starred_url":"https://api.github.com/users/alimy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alimy/subscriptions","organizations_url":"https://api.github.com/users/alimy/orgs","repos_url":"https://api.github.com/users/alimy/repos","events_url":"https://api.github.com/users/alimy/events{/privacy}","received_events_url":"https://api.github.com/users/alimy/received_events","type":"User","site_admin":false},"repo":{"id":135977030,"node_id":"MDEwOlJlcG9zaXRvcnkxMzU5NzcwMzA=","name":"gogs","full_name":"alimy/gogs","owner":{"login":"alimy","id":10525842,"node_id":"MDQ6VXNlcjEwNTI1ODQy","avatar_url":"https://avatars0.githubusercontent.com/u/10525842?v=4","gravatar_id":"","url":"https://api.github.com/users/alimy","html_url":"https://github.com/alimy","followers_url":"https://api.github.com/users/alimy/followers","following_url":"https://api.github.com/users/alimy/following{/other_user}","gists_url":"https://api.github.com/users/alimy/gists{/gist_id}","starred_url":"https://api.github.com/users/alimy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alimy/subscriptions","organizations_url":"https://api.github.com/users/alimy/orgs","repos_url":"https://api.github.com/users/alimy/repos","events_url":"https://api.github.com/users/alimy/events{/privacy}","received_events_url":"https://api.github.com/users/alimy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alimy/gogs","description":"Gogs is a painless self-hosted Git service.","fork":true,"url":"https://api.github.com/repos/alimy/gogs","forks_url":"https://api.github.com/repos/alimy/gogs/forks","keys_url":"https://api.github.com/repos/alimy/gogs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alimy/gogs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alimy/gogs/teams","hooks_url":"https://api.github.com/repos/alimy/gogs/hooks","issue_events_url":"https://api.github.com/repos/alimy/gogs/issues/events{/number}","events_url":"https://api.github.com/repos/alimy/gogs/events","assignees_url":"https://api.github.com/repos/alimy/gogs/assignees{/user}","branches_url":"https://api.github.com/repos/alimy/gogs/branches{/branch}","tags_url":"https://api.github.com/repos/alimy/gogs/tags","blobs_url":"https://api.github.com/repos/alimy/gogs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alimy/gogs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alimy/gogs/git/refs{/sha}","trees_url":"https://api.github.com/repos/alimy/gogs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alimy/gogs/statuses/{sha}","languages_url":"https://api.github.com/repos/alimy/gogs/languages","stargazers_url":"https://api.github.com/repos/alimy/gogs/stargazers","contributors_url":"https://api.github.com/repos/alimy/gogs/contributors","subscribers_url":"https://api.github.com/repos/alimy/gogs/subscribers","subscription_url":"https://api.github.com/repos/alimy/gogs/subscription","commits_url":"https://api.github.com/repos/alimy/gogs/commits{/sha}","git_commits_url":"https://api.github.com/repos/alimy/gogs/git/commits{/sha}","comments_url":"https://api.github.com/repos/alimy/gogs/comments{/number}","issue_comment_url":"https://api.github.com/repos/alimy/gogs/issues/comments{/number}","contents_url":"https://api.github.com/repos/alimy/gogs/contents/{+path}","compare_url":"https://api.github.com/repos/alimy/gogs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alimy/gogs/merges","archive_url":"https://api.github.com/repos/alimy/gogs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alimy/gogs/downloads","issues_url":"https://api.github.com/repos/alimy/gogs/issues{/number}","pulls_url":"https://api.github.com/repos/alimy/gogs/pulls{/number}","milestones_url":"https://api.github.com/repos/alimy/gogs/milestones{/number}","notifications_url":"https://api.github.com/repos/alimy/gogs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alimy/gogs/labels{/name}","releases_url":"https://api.github.com/repos/alimy/gogs/releases{/id}","deployments_url":"https://api.github.com/repos/alimy/gogs/deployments","created_at":"2018-06-04T05:54:49Z","updated_at":"2018-06-04T05:54:53Z","pushed_at":"2018-06-30T03:20:45Z","git_url":"git://github.com/alimy/gogs.git","ssh_url":"git@github.com:alimy/gogs.git","clone_url":"https://github.com/alimy/gogs.git","svn_url":"https://github.com/alimy/gogs","homepage":"https://gogs.io","size":145633,"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":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"gogs:master","ref":"master","sha":"2a86b3e31d19e8dab987dcf927cfb3363e946d53","user":{"login":"gogs","id":6656686,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY2NTY2ODY=","avatar_url":"https://avatars0.githubusercontent.com/u/6656686?v=4","gravatar_id":"","url":"https://api.github.com/users/gogs","html_url":"https://github.com/gogs","followers_url":"https://api.github.com/users/gogs/followers","following_url":"https://api.github.com/users/gogs/following{/other_user}","gists_url":"https://api.github.com/users/gogs/gists{/gist_id}","starred_url":"https://api.github.com/users/gogs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gogs/subscriptions","organizations_url":"https://api.github.com/users/gogs/orgs","repos_url":"https://api.github.com/users/gogs/repos","events_url":"https://api.github.com/users/gogs/events{/privacy}","received_events_url":"https://api.github.com/users/gogs/received_events","type":"Organization","site_admin":false},"repo":{"id":16752620,"node_id":"MDEwOlJlcG9zaXRvcnkxNjc1MjYyMA==","name":"gogs","full_name":"gogs/gogs","owner":{"login":"gogs","id":6656686,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY2NTY2ODY=","avatar_url":"https://avatars0.githubusercontent.com/u/6656686?v=4","gravatar_id":"","url":"https://api.github.com/users/gogs","html_url":"https://github.com/gogs","followers_url":"https://api.github.com/users/gogs/followers","following_url":"https://api.github.com/users/gogs/following{/other_user}","gists_url":"https://api.github.com/users/gogs/gists{/gist_id}","starred_url":"https://api.github.com/users/gogs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gogs/subscriptions","organizations_url":"https://api.github.com/users/gogs/orgs","repos_url":"https://api.github.com/users/gogs/repos","events_url":"https://api.github.com/users/gogs/events{/privacy}","received_events_url":"https://api.github.com/users/gogs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gogs/gogs","description":"Gogs is a painless self-hosted Git service.","fork":false,"url":"https://api.github.com/repos/gogs/gogs","forks_url":"https://api.github.com/repos/gogs/gogs/forks","keys_url":"https://api.github.com/repos/gogs/gogs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gogs/gogs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gogs/gogs/teams","hooks_url":"https://api.github.com/repos/gogs/gogs/hooks","issue_events_url":"https://api.github.com/repos/gogs/gogs/issues/events{/number}","events_url":"https://api.github.com/repos/gogs/gogs/events","assignees_url":"https://api.github.com/repos/gogs/gogs/assignees{/user}","branches_url":"https://api.github.com/repos/gogs/gogs/branches{/branch}","tags_url":"https://api.github.com/repos/gogs/gogs/tags","blobs_url":"https://api.github.com/repos/gogs/gogs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gogs/gogs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gogs/gogs/git/refs{/sha}","trees_url":"https://api.github.com/repos/gogs/gogs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gogs/gogs/statuses/{sha}","languages_url":"https://api.github.com/repos/gogs/gogs/languages","stargazers_url":"https://api.github.com/repos/gogs/gogs/stargazers","contributors_url":"https://api.github.com/repos/gogs/gogs/contributors","subscribers_url":"https://api.github.com/repos/gogs/gogs/subscribers","subscription_url":"https://api.github.com/repos/gogs/gogs/subscription","commits_url":"https://api.github.com/repos/gogs/gogs/commits{/sha}","git_commits_url":"https://api.github.com/repos/gogs/gogs/git/commits{/sha}","comments_url":"https://api.github.com/repos/gogs/gogs/comments{/number}","issue_comment_url":"https://api.github.com/repos/gogs/gogs/issues/comments{/number}","contents_url":"https://api.github.com/repos/gogs/gogs/contents/{+path}","compare_url":"https://api.github.com/repos/gogs/gogs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gogs/gogs/merges","archive_url":"https://api.github.com/repos/gogs/gogs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gogs/gogs/downloads","issues_url":"https://api.github.com/repos/gogs/gogs/issues{/number}","pulls_url":"https://api.github.com/repos/gogs/gogs/pulls{/number}","milestones_url":"https://api.github.com/repos/gogs/gogs/milestones{/number}","notifications_url":"https://api.github.com/repos/gogs/gogs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gogs/gogs/labels{/name}","releases_url":"https://api.github.com/repos/gogs/gogs/releases{/id}","deployments_url":"https://api.github.com/repos/gogs/gogs/deployments","created_at":"2014-02-12T01:57:08Z","updated_at":"2018-06-30T00:18:52Z","pushed_at":"2018-06-30T03:38:56Z","git_url":"git://github.com/gogs/gogs.git","ssh_url":"git@github.com:gogs/gogs.git","clone_url":"https://github.com/gogs/gogs.git","svn_url":"https://github.com/gogs/gogs","homepage":"https://gogs.io","size":145631,"stargazers_count":25933,"watchers_count":25933,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3002,"mirror_url":null,"archived":false,"open_issues_count":634,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":3002,"open_issues":634,"watchers":25933,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gogs/gogs/pulls/5321"},"html":{"href":"https://github.com/gogs/gogs/pull/5321"},"issue":{"href":"https://api.github.com/repos/gogs/gogs/issues/5321"},"comments":{"href":"https://api.github.com/repos/gogs/gogs/issues/5321/comments"},"review_comments":{"href":"https://api.github.com/repos/gogs/gogs/pulls/5321/comments"},"review_comment":{"href":"https://api.github.com/repos/gogs/gogs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gogs/gogs/pulls/5321/commits"},"statuses":{"href":"https://api.github.com/repos/gogs/gogs/statuses/6400906380c482444d14320476effdbace7e2e7d"}},"author_association":"NONE","merged":false,"mergeable":true,"rebaseable":true,"mergeable_state":"unstable","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":62,"deletions":0,"changed_files":3}}
{"actor":{"display_login":"winsx"}}