{"action":"created","comment":{"url":"https://api.github.com/repos/ministryofjustice/docker-tomee/pulls/comments/184628043","pull_request_review_id":111545225,"id":184628043,"diff_hunk":"@@ -18,26 +18,42 @@ Exported environment variables\n TOMCAT_HOME                 | usr/local/tomee | Installed location for Tomcat\n TOMCAT_CONNECTOR_PROXY_PORT | 443             | Configure this attribute to specify the server port to be returned for calls to request.getServerPort()\n TOMCAT_CONNECTOR_SCHEME | https           | Set this attribute to the name of the protocol you wish to have returned by calls to request.getScheme()\n+CATALINA_OPTS | -Dconnector.proxy.port=443 -Dconnector.scheme=https | Options used to configure Tomcat\n \n-Usage\n------\n-When creating your own docker image from this base image, you must have the following in your Dockerfile: \n-- *optional*: specify custom values for the custom connector environment variables\n-- **required**: set the CATALINA_OPTS environment variable to inject the new HTTP connector environment variables\n-and then run the catalina.sh command to start tomcat:\n+Required system properties\n+--------------------------\n  \n- ```sh\n-ENV TOMCAT_CONNECTOR_PROXY_PORT 8080\n-ENV TOMCAT_CONNECTOR_SCHEME http\n-\n-CMD CATALINA_OPTS=\"$CATALINA_OPTS \\\n-    -Dconnector.proxy.port=$TOMCAT_CONNECTOR_PROXY_PORT \\\n-    -Dconnector.scheme=$TOMCAT_CONNECTOR_SCHEME\" \\\n-    catalina.sh run\n+Name | Value | Description\n+--- | --- | ---\n+connector.proxy.port | 443 | Configure this attribute to specify the server port to be returned for calls to request.getServerPort()\n+connector.scheme | https | Set this attribute to the name of the protocol you wish to have returned by calls to request.getScheme()\n+\n+These are secure-by-default settings which assume that the Docker image is\n+running behind a reverse-proxy that is responsible for terminating TLS. It\n+ensures that Tomcat (and any libraries that your application uses) assume\n+that it is running in a secure configuration, and behave accordingly.\n+\n+For local development, you may want to drop these. In your Dockerfile, you may want:\n+\n+```\n+ENV CATALINA_OPTS=\"\\\n+    -Dconnector.proxy.port=${TOMCAT_CONNECTOR_PROXY_PORT} \\\n+    -Dconnector.scheme=${TOMCAT_CONNECTOR_SCHEME} \\\n+\"\n ```\n \n-Alternatively you can specify overrides of the environment variables with runtime arguments:\n+You can then run it locally using:\n \n-```sh\n-docker container run -e TOMCAT_CONNECTOR_PROXY_PORT=8080 -e TOMCAT_CONNECTOR_SCHEME=http myhardenedcontainer\n-```\n\\ No newline at end of file\n+```\n+docker run --rm -it \\\n+    -e TOMCAT_CONNECTOR_PROXY_PORT=8080 `","path":"README.md","position":51,"original_position":51,"commit_id":"49c46ef77565ce8f0cb88139b649c3522c4fa56e","original_commit_id":"49c46ef77565ce8f0cb88139b649c3522c4fa56e","user":{"login":"v1-evansb","id":34337601,"avatar_url":"https://avatars3.githubusercontent.com/u/34337601?v=4","gravatar_id":"","url":"https://api.github.com/users/v1-evansb","html_url":"https://github.com/v1-evansb","followers_url":"https://api.github.com/users/v1-evansb/followers","following_url":"https://api.github.com/users/v1-evansb/following{/other_user}","gists_url":"https://api.github.com/users/v1-evansb/gists{/gist_id}","starred_url":"https://api.github.com/users/v1-evansb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/v1-evansb/subscriptions","organizations_url":"https://api.github.com/users/v1-evansb/orgs","repos_url":"https://api.github.com/users/v1-evansb/repos","events_url":"https://api.github.com/users/v1-evansb/events{/privacy}","received_events_url":"https://api.github.com/users/v1-evansb/received_events","type":"User","site_admin":false},"body":"tidy up this line ending please","created_at":"2018-04-27T08:50:28Z","updated_at":"2018-04-27T08:50:54Z","html_url":"https://github.com/ministryofjustice/docker-tomee/pull/6#discussion_r184628043","pull_request_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/pulls/6","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/docker-tomee/pulls/comments/184628043"},"html":{"href":"https://github.com/ministryofjustice/docker-tomee/pull/6#discussion_r184628043"},"pull_request":{"href":"https://api.github.com/repos/ministryofjustice/docker-tomee/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/ministryofjustice/docker-tomee/pulls/6","id":181123109,"html_url":"https://github.com/ministryofjustice/docker-tomee/pull/6","diff_url":"https://github.com/ministryofjustice/docker-tomee/pull/6.diff","patch_url":"https://github.com/ministryofjustice/docker-tomee/pull/6.patch","issue_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/issues/6","number":6,"state":"open","locked":false,"title":"Simplify consumption of this image","user":{"login":"jabley","id":16205,"avatar_url":"https://avatars3.githubusercontent.com/u/16205?v=4","gravatar_id":"","url":"https://api.github.com/users/jabley","html_url":"https://github.com/jabley","followers_url":"https://api.github.com/users/jabley/followers","following_url":"https://api.github.com/users/jabley/following{/other_user}","gists_url":"https://api.github.com/users/jabley/gists{/gist_id}","starred_url":"https://api.github.com/users/jabley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jabley/subscriptions","organizations_url":"https://api.github.com/users/jabley/orgs","repos_url":"https://api.github.com/users/jabley/repos","events_url":"https://api.github.com/users/jabley/events{/privacy}","received_events_url":"https://api.github.com/users/jabley/received_events","type":"User","site_admin":false},"body":"Reuse the CMD definition in the parent image. We do not think that\nany consumers of this image should need to override it. The purpose of\nthis image is to run TomEE. TomEE is configured using the existing\nenvironment variables defined in the standard Tomcat launcher script\n`catalina.sh`. Configuring the dockerised version via environment\nvariables should also be the pattern.\n\nDefines CATALINA_OPTS to configure a secure-by-default configuration,\nlisting assumptions.\n\nProvides guidance on how consumers should customise it.","created_at":"2018-04-12T08:17:15Z","updated_at":"2018-04-27T08:50:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0701105f7e56f95a3833b599fbf6d7a4afe16522","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/pulls/6/commits","review_comments_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/pulls/6/comments","review_comment_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/issues/6/comments","statuses_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/statuses/49c46ef77565ce8f0cb88139b649c3522c4fa56e","head":{"label":"ministryofjustice:feature/simplify","ref":"feature/simplify","sha":"49c46ef77565ce8f0cb88139b649c3522c4fa56e","user":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars3.githubusercontent.com/u/2203574?v=4","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"repo":{"id":128027208,"name":"docker-tomee","full_name":"ministryofjustice/docker-tomee","owner":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars3.githubusercontent.com/u/2203574?v=4","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ministryofjustice/docker-tomee","description":"Hardened TomEE image","fork":false,"url":"https://api.github.com/repos/ministryofjustice/docker-tomee","forks_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/forks","keys_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/events","assignees_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/issues/comments{/number}","contents_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/merges","archive_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/releases{/id}","deployments_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/deployments","created_at":"2018-04-04T07:50:42Z","updated_at":"2018-04-26T20:10:25Z","pushed_at":"2018-04-26T20:10:27Z","git_url":"git://github.com/ministryofjustice/docker-tomee.git","ssh_url":"git@github.com:ministryofjustice/docker-tomee.git","clone_url":"https://github.com/ministryofjustice/docker-tomee.git","svn_url":"https://github.com/ministryofjustice/docker-tomee","homepage":null,"size":24,"stargazers_count":1,"watchers_count":1,"language":"Makefile","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":3,"watchers":1,"default_branch":"master"}},"base":{"label":"ministryofjustice:master","ref":"master","sha":"b3eef6d5301e45a17e66d096fd1161a6c9d5f0df","user":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars3.githubusercontent.com/u/2203574?v=4","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"repo":{"id":128027208,"name":"docker-tomee","full_name":"ministryofjustice/docker-tomee","owner":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars3.githubusercontent.com/u/2203574?v=4","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ministryofjustice/docker-tomee","description":"Hardened TomEE image","fork":false,"url":"https://api.github.com/repos/ministryofjustice/docker-tomee","forks_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/forks","keys_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/events","assignees_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/issues/comments{/number}","contents_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/merges","archive_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/releases{/id}","deployments_url":"https://api.github.com/repos/ministryofjustice/docker-tomee/deployments","created_at":"2018-04-04T07:50:42Z","updated_at":"2018-04-26T20:10:25Z","pushed_at":"2018-04-26T20:10:27Z","git_url":"git://github.com/ministryofjustice/docker-tomee.git","ssh_url":"git@github.com:ministryofjustice/docker-tomee.git","clone_url":"https://github.com/ministryofjustice/docker-tomee.git","svn_url":"https://github.com/ministryofjustice/docker-tomee","homepage":null,"size":24,"stargazers_count":1,"watchers_count":1,"language":"Makefile","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/docker-tomee/pulls/6"},"html":{"href":"https://github.com/ministryofjustice/docker-tomee/pull/6"},"issue":{"href":"https://api.github.com/repos/ministryofjustice/docker-tomee/issues/6"},"comments":{"href":"https://api.github.com/repos/ministryofjustice/docker-tomee/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/ministryofjustice/docker-tomee/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/ministryofjustice/docker-tomee/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ministryofjustice/docker-tomee/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/ministryofjustice/docker-tomee/statuses/49c46ef77565ce8f0cb88139b649c3522c4fa56e"}},"author_association":"OWNER"}}
{"actor":{"display_login":"v1-evansb"}}