{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/dotnet-docker/pulls/comments/189246572","pull_request_review_id":121390929,"id":189246572,"diff_hunk":"@@ -1,84 +1,30 @@\n-# Hosting ASP.NET Core with Docker over HTTPS\n+# Hosting ASP.NET Core Images with Docker over HTTPS\n \n-ASP.NET Core 2.1 uses [HTTPS by default](https://docs.microsoft.com/en-us/aspnet/core/security/enforcing-ssl). [HTTPS](https://en.wikipedia.org/wiki/HTTPS) relies on [certificates](https://en.wikipedia.org/wiki/Public_key_certificate) for trust, identity and encryption.\n+ASP.NET Core 2.1 uses [HTTPS by default](https://docs.microsoft.com/aspnet/core/security/enforcing-ssl). [HTTPS](https://en.wikipedia.org/wiki/HTTPS) relies on [certificates](https://en.wikipedia.org/wiki/Public_key_certificate) for trust, identity, and encryption.\n \n-ASP.NET Core uses [self-signed dev certificates](https://en.wikipedia.org/wiki/Self-signed_certificate) for development. Self-signed certificates are easy and free to create. For [production hosting](https://blogs.msdn.microsoft.com/webdev/2017/11/29/configuring-https-in-asp-net-core-across-different-platforms/), you need a certificate from a [certificate authority](https://en.wikipedia.org/wiki/Certificate_authority). [Let's Encrypt](https://letsencrypt.org/) is a certificate authority that offers free certificates.\n+This document explains how to run pre-built container images with HTTPS.\n \n-This document explains how to configure Docker containers to use certificates. The instructions are based on the [ASP.NET Core Docker Sample](README.md). These instructions use the same sample but are more brief. Consult the [ASP.NET Core Docker Sample](README.md) for help if these instructions are not working.\n-\n-The instructions volume mount certificates into containers. You can add certificates into container images with a `COPY` command in a Dockerfile. This approach is not recommended. It makes it harder to use the same image for testing with dev certificates and hosting with production certificates. There is also a  significant risk of certificate disclosure if certificates are made part of container images.\n-\n-The samples are written for `cmd.exe`. PowerShell users will need to special case the environment variables that are used in the instructions.\n+See [Developing ASP.NET Core Applications with Docker over HTTPS](aspnetcore-docker-https-development.md) for development scenarios.\n \n This sample requires [Docker 17.06](https://docs.docker.com/release-notes/docker-ce) or later of the [Docker client](https://www.docker.com/products/docker).\n \n-## Getting the sample\n-\n-The easiest way to get the sample is by cloning the samples repository with git, using the following instructions:\n-\n-```console\n-git clone https://github.com/dotnet/dotnet-docker/\n-```\n-\n-You can also [download the repository as a zip](https://github.com/dotnet/dotnet-docker/archive/master.zip).\n-\n-## Host ASP.NET Core over HTTP with Docker\n-\n-The sample can be run over HTTP to test the basic function of ASP.NET Core. Testing with HTTP first is a good idea to make sure that the sample is working correctly before testing with cerificates. The instructions assume that you are in the root of the repository.\n-\n-```console\n-cd samples\n-cd aspnetapp\n-docker build --pull -t aspnetapp .\n-docker run --name aspnetcore_sample --rm -it -p 8000:80 aspnetapp\n-```\n-\n-You can also test the same sample as a pre-built image with the following instructions:\n+## Certificates\n \n-```console\n-docker pull microsoft/dotnet-samples:aspnetapp\n-docker run --name aspnetcore_sample --rm -it -p 8000:80 microsoft/dotnet-samples:aspnetapp\n-```\n-\n-After the application starts, navigate to `http://localhost:8000` in your web browser. On Windows, you may need to navigate to the container via IP address. See [ASP.NET Core apps in Windows Containers](aspnetcore-docker-windows.md) for instructions on determining the IP address, using the value of `--name` that you used in `docker run`.\n-\n-> Note: The `-p` argument maps port 8000 on your local machine to port 80 in the container (the form of the port mapping is `host:container`). See the [Docker run reference](https://docs.docker.com/engine/reference/commandline/run/) for more information on commandline parameters. In some cases, you might see an error because the host port you select is already in use. Choose a different port in that case.\n-\n-> Note: The sample includes a banner to accept a cookie policy. When switching between HTTP and HTTPS, you may see the banner repeatedly. Switch to *InPrivate*/*incognito* mode in that case.\n-\n-## Host ASP.NET Core over HTTPS with Dev Certs\n+You need a certificate from a [certificate authority](https://en.wikipedia.org/wiki/Certificate_authority) for [production hosting](https://blogs.msdn.microsoft.com/webdev/2017/11/29/configuring-https-in-asp-net-core-across-different-platforms/) for your domain. You may already have one. [Let's Encrypt](https://letsencrypt.org/) is a certificate authority that offers free certificates.\n \n-In development, you can use dev certs to [Use HTTPS with ASP.NET Core](https://docs.microsoft.com/aspnet/core/security/enforcing-ssl). There are three steps to follow:\n+This document uses [self-signed development certificates](https://en.wikipedia.org/wiki/Self-signed_certificate for hosting pre-built images over `localhost`. The instructions are similar to using production certificates.","path":"samples/aspnetapp/aspnetcore-docker-https.md","position":58,"original_position":58,"commit_id":"0bf7e3d23c1dacfe46d6c659c1c479e59fe1237c","original_commit_id":"0bf7e3d23c1dacfe46d6c659c1c479e59fe1237c","user":{"login":"MichaelSimons","id":8290530,"avatar_url":"https://avatars1.githubusercontent.com/u/8290530?v=4","gravatar_id":"","url":"https://api.github.com/users/MichaelSimons","html_url":"https://github.com/MichaelSimons","followers_url":"https://api.github.com/users/MichaelSimons/followers","following_url":"https://api.github.com/users/MichaelSimons/following{/other_user}","gists_url":"https://api.github.com/users/MichaelSimons/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelSimons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelSimons/subscriptions","organizations_url":"https://api.github.com/users/MichaelSimons/orgs","repos_url":"https://api.github.com/users/MichaelSimons/repos","events_url":"https://api.github.com/users/MichaelSimons/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelSimons/received_events","type":"User","site_admin":false},"body":"missing the closing `)` in the hyperlink.","created_at":"2018-05-18T12:04:05Z","updated_at":"2018-05-18T12:09:19Z","html_url":"https://github.com/dotnet/dotnet-docker/pull/545#discussion_r189246572","pull_request_url":"https://api.github.com/repos/dotnet/dotnet-docker/pulls/545","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/dotnet/dotnet-docker/pulls/comments/189246572"},"html":{"href":"https://github.com/dotnet/dotnet-docker/pull/545#discussion_r189246572"},"pull_request":{"href":"https://api.github.com/repos/dotnet/dotnet-docker/pulls/545"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/dotnet-docker/pulls/545","id":188813322,"html_url":"https://github.com/dotnet/dotnet-docker/pull/545","diff_url":"https://github.com/dotnet/dotnet-docker/pull/545.diff","patch_url":"https://github.com/dotnet/dotnet-docker/pull/545.patch","issue_url":"https://api.github.com/repos/dotnet/dotnet-docker/issues/545","number":545,"state":"open","locked":false,"title":"Update HTTPS instructions","user":{"login":"richlander","id":2608468,"avatar_url":"https://avatars3.githubusercontent.com/u/2608468?v=4","gravatar_id":"","url":"https://api.github.com/users/richlander","html_url":"https://github.com/richlander","followers_url":"https://api.github.com/users/richlander/followers","following_url":"https://api.github.com/users/richlander/following{/other_user}","gists_url":"https://api.github.com/users/richlander/gists{/gist_id}","starred_url":"https://api.github.com/users/richlander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richlander/subscriptions","organizations_url":"https://api.github.com/users/richlander/orgs","repos_url":"https://api.github.com/users/richlander/repos","events_url":"https://api.github.com/users/richlander/events{/privacy}","received_events_url":"https://api.github.com/users/richlander/received_events","type":"User","site_admin":false},"body":"- `aspnetcore-docker-https-development.md` is a new document. It contains the information that used to be in `aspnetcore-docker-https.md`, with updates.\r\n- The content in `aspnetcore-docker-https.md` is new. The diff isn't meaningful as a result.","created_at":"2018-05-17T17:48:00Z","updated_at":"2018-05-18T12:09:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"54706e51fad6d5b7d87d11eca273e35e86785e61","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/dotnet-docker/pulls/545/commits","review_comments_url":"https://api.github.com/repos/dotnet/dotnet-docker/pulls/545/comments","review_comment_url":"https://api.github.com/repos/dotnet/dotnet-docker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/dotnet-docker/issues/545/comments","statuses_url":"https://api.github.com/repos/dotnet/dotnet-docker/statuses/0bf7e3d23c1dacfe46d6c659c1c479e59fe1237c","head":{"label":"dotnet:sample-https","ref":"sample-https","sha":"0bf7e3d23c1dacfe46d6c659c1c479e59fe1237c","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":46298331,"name":"dotnet-docker","full_name":"dotnet/dotnet-docker","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/dotnet-docker","description":"This repo contains the base Docker images for working with .NET Core and the .NET Core Tools.","fork":false,"url":"https://api.github.com/repos/dotnet/dotnet-docker","forks_url":"https://api.github.com/repos/dotnet/dotnet-docker/forks","keys_url":"https://api.github.com/repos/dotnet/dotnet-docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/dotnet-docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/dotnet-docker/teams","hooks_url":"https://api.github.com/repos/dotnet/dotnet-docker/hooks","issue_events_url":"https://api.github.com/repos/dotnet/dotnet-docker/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/dotnet-docker/events","assignees_url":"https://api.github.com/repos/dotnet/dotnet-docker/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/dotnet-docker/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/dotnet-docker/tags","blobs_url":"https://api.github.com/repos/dotnet/dotnet-docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/dotnet-docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/dotnet-docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/dotnet-docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/dotnet-docker/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/dotnet-docker/languages","stargazers_url":"https://api.github.com/repos/dotnet/dotnet-docker/stargazers","contributors_url":"https://api.github.com/repos/dotnet/dotnet-docker/contributors","subscribers_url":"https://api.github.com/repos/dotnet/dotnet-docker/subscribers","subscription_url":"https://api.github.com/repos/dotnet/dotnet-docker/subscription","commits_url":"https://api.github.com/repos/dotnet/dotnet-docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/dotnet-docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/dotnet-docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/dotnet-docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/dotnet-docker/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/dotnet-docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/dotnet-docker/merges","archive_url":"https://api.github.com/repos/dotnet/dotnet-docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/dotnet-docker/downloads","issues_url":"https://api.github.com/repos/dotnet/dotnet-docker/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/dotnet-docker/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/dotnet-docker/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/dotnet-docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/dotnet-docker/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/dotnet-docker/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/dotnet-docker/deployments","created_at":"2015-11-16T19:51:06Z","updated_at":"2018-05-18T10:43:02Z","pushed_at":"2018-05-18T11:57:40Z","git_url":"git://github.com/dotnet/dotnet-docker.git","ssh_url":"git@github.com:dotnet/dotnet-docker.git","clone_url":"https://github.com/dotnet/dotnet-docker.git","svn_url":"https://github.com/dotnet/dotnet-docker","homepage":"https://hub.docker.com/r/microsoft/dotnet/","size":1355,"stargazers_count":705,"watchers_count":705,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":193,"mirror_url":null,"archived":false,"open_issues_count":27,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":193,"open_issues":27,"watchers":705,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"a2f61a1213de4cbd6ebe183747bdac70a8159809","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":46298331,"name":"dotnet-docker","full_name":"dotnet/dotnet-docker","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/dotnet-docker","description":"This repo contains the base Docker images for working with .NET Core and the .NET Core Tools.","fork":false,"url":"https://api.github.com/repos/dotnet/dotnet-docker","forks_url":"https://api.github.com/repos/dotnet/dotnet-docker/forks","keys_url":"https://api.github.com/repos/dotnet/dotnet-docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/dotnet-docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/dotnet-docker/teams","hooks_url":"https://api.github.com/repos/dotnet/dotnet-docker/hooks","issue_events_url":"https://api.github.com/repos/dotnet/dotnet-docker/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/dotnet-docker/events","assignees_url":"https://api.github.com/repos/dotnet/dotnet-docker/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/dotnet-docker/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/dotnet-docker/tags","blobs_url":"https://api.github.com/repos/dotnet/dotnet-docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/dotnet-docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/dotnet-docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/dotnet-docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/dotnet-docker/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/dotnet-docker/languages","stargazers_url":"https://api.github.com/repos/dotnet/dotnet-docker/stargazers","contributors_url":"https://api.github.com/repos/dotnet/dotnet-docker/contributors","subscribers_url":"https://api.github.com/repos/dotnet/dotnet-docker/subscribers","subscription_url":"https://api.github.com/repos/dotnet/dotnet-docker/subscription","commits_url":"https://api.github.com/repos/dotnet/dotnet-docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/dotnet-docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/dotnet-docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/dotnet-docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/dotnet-docker/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/dotnet-docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/dotnet-docker/merges","archive_url":"https://api.github.com/repos/dotnet/dotnet-docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/dotnet-docker/downloads","issues_url":"https://api.github.com/repos/dotnet/dotnet-docker/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/dotnet-docker/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/dotnet-docker/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/dotnet-docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/dotnet-docker/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/dotnet-docker/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/dotnet-docker/deployments","created_at":"2015-11-16T19:51:06Z","updated_at":"2018-05-18T10:43:02Z","pushed_at":"2018-05-18T11:57:40Z","git_url":"git://github.com/dotnet/dotnet-docker.git","ssh_url":"git@github.com:dotnet/dotnet-docker.git","clone_url":"https://github.com/dotnet/dotnet-docker.git","svn_url":"https://github.com/dotnet/dotnet-docker","homepage":"https://hub.docker.com/r/microsoft/dotnet/","size":1355,"stargazers_count":705,"watchers_count":705,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":193,"mirror_url":null,"archived":false,"open_issues_count":27,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":193,"open_issues":27,"watchers":705,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/dotnet-docker/pulls/545"},"html":{"href":"https://github.com/dotnet/dotnet-docker/pull/545"},"issue":{"href":"https://api.github.com/repos/dotnet/dotnet-docker/issues/545"},"comments":{"href":"https://api.github.com/repos/dotnet/dotnet-docker/issues/545/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/dotnet-docker/pulls/545/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/dotnet-docker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/dotnet-docker/pulls/545/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/dotnet-docker/statuses/0bf7e3d23c1dacfe46d6c659c1c479e59fe1237c"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"MichaelSimons"}}