{"action":"created","comment":{"url":"https://api.github.com/repos/apache/nifi/pulls/comments/195262129","pull_request_review_id":128569905,"id":195262129,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTI2MjEyOQ==","diff_hunk":"@@ -26,23 +26,33 @@ ARG NIFI_BINARY\n \n ENV NIFI_BASE_DIR /opt/nifi\n ENV NIFI_HOME $NIFI_BASE_DIR/nifi-$NIFI_VERSION\n-\n-# Setup NiFi user\n-RUN groupadd -g $GID nifi || groupmod -n nifi `getent group $GID | cut -d: -f1` \\\n-    && useradd --shell /bin/bash -u $UID -g $GID -m nifi \\\n-    && mkdir -p $NIFI_HOME/conf/templates \\\n-    && chown -R nifi:nifi $NIFI_BASE_DIR\n+ENV NIFI_PID_DIR=${NIFI_HOME}/run\n+ENV NIFI_LOG_DIR=${NIFI_HOME}/logs\n \n ADD $NIFI_BINARY $NIFI_BASE_DIR\n-RUN chown -R nifi:nifi $NIFI_HOME\n+# Setup NiFi user and create necessary directories\n+RUN groupadd -g ${GID} nifi || groupmod -n nifi `getent group ${GID} | cut -d: -f1` \\\n+    && useradd --shell /bin/bash -u ${UID} -g ${GID} -m nifi \\\n+    && mkdir -p ${NIFI_HOME}/conf/templates \\\n+    && mkdir -p $NIFI_BASE_DIR/data \\\n+    && mkdir -p $NIFI_BASE_DIR/flowfile_repository \\\n+    && mkdir -p $NIFI_BASE_DIR/content_repository \\\n+    && mkdir -p $NIFI_BASE_DIR/provenance_repository \\\n+    && mkdir -p $NIFI_LOG_DIR \\\n+    && chown -R nifi:nifi ${NIFI_BASE_DIR} \\\n+    && apt-get update \\\n+    && apt-get install -y jq xmlstarlet procps\n \n USER nifi\n \n-# Web HTTP Port & Remote Site-to-Site Ports\n-EXPOSE 8080 8181\n+# Clear nifi-env.sh in favour of configuring all environment variables in the Dockerfile\n+RUN echo \"#!/bin/sh\\n\" > $NIFI_HOME/bin/nifi-env.sh\n+\n+# Web HTTP(s) & Socket Site-to-Site Ports\n+EXPOSE 8080 8443 10000\n \n-WORKDIR $NIFI_HOME\n+WORKDIR ${NIFI_HOME}\n \n # Startup NiFi\n ENTRYPOINT [\"bin/nifi.sh\"]\n-CMD [\"run\"]\n+CMD [\"run\"]","path":"nifi-docker/dockermaven/Dockerfile","position":44,"original_position":44,"commit_id":"0c4f9a0ba4b64e258386ef3526c7b44b1f4ba9f7","original_commit_id":"0c4f9a0ba4b64e258386ef3526c7b44b1f4ba9f7","user":{"login":"jtstorck","id":19271493,"node_id":"MDQ6VXNlcjE5MjcxNDkz","avatar_url":"https://avatars3.githubusercontent.com/u/19271493?v=4","gravatar_id":"","url":"https://api.github.com/users/jtstorck","html_url":"https://github.com/jtstorck","followers_url":"https://api.github.com/users/jtstorck/followers","following_url":"https://api.github.com/users/jtstorck/following{/other_user}","gists_url":"https://api.github.com/users/jtstorck/gists{/gist_id}","starred_url":"https://api.github.com/users/jtstorck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtstorck/subscriptions","organizations_url":"https://api.github.com/users/jtstorck/orgs","repos_url":"https://api.github.com/users/jtstorck/repos","events_url":"https://api.github.com/users/jtstorck/events{/privacy}","received_events_url":"https://api.github.com/users/jtstorck/received_events","type":"User","site_admin":false},"body":"Creating a container with:\r\n`docker run -p 8080:8080 apache/nifi:1.7.0-SNAPSHOT-dockermaven`\r\nresults in NiFi starting successfully, but I'm unable to control-c out of the container.  I'm not a docker expert, but I would expect that hitting control-c would kill the container.  Although, since I didn't run it in interactive mode, this is probably a docker thing, not specific to this Dockerfile.\r\n\r\nStarting the container with:\r\n`docker run -d -p 8080:8080 apache/nifi:1.7.0-SNAPSHOT-dockermaven`\r\nand then issuing:\r\n`docker logs <container>`\r\nI see the nifi-bootstrap output, but not the nifi-app.log and nifi-user.log output.  Would it be preferable to have this behavior?  ","created_at":"2018-06-13T23:04:30Z","updated_at":"2018-06-13T23:07:10Z","html_url":"https://github.com/apache/nifi/pull/2747#discussion_r195262129","pull_request_url":"https://api.github.com/repos/apache/nifi/pulls/2747","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/nifi/pulls/comments/195262129"},"html":{"href":"https://github.com/apache/nifi/pull/2747#discussion_r195262129"},"pull_request":{"href":"https://api.github.com/repos/apache/nifi/pulls/2747"}}},"pull_request":{"url":"https://api.github.com/repos/apache/nifi/pulls/2747","id":191364998,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxMzY0OTk4","html_url":"https://github.com/apache/nifi/pull/2747","diff_url":"https://github.com/apache/nifi/pull/2747.diff","patch_url":"https://github.com/apache/nifi/pull/2747.patch","issue_url":"https://api.github.com/repos/apache/nifi/issues/2747","number":2747,"state":"open","locked":false,"title":"NIFI-5249 Dockerfile enhancements","user":{"login":"pepov","id":682440,"node_id":"MDQ6VXNlcjY4MjQ0MA==","avatar_url":"https://avatars0.githubusercontent.com/u/682440?v=4","gravatar_id":"","url":"https://api.github.com/users/pepov","html_url":"https://github.com/pepov","followers_url":"https://api.github.com/users/pepov/followers","following_url":"https://api.github.com/users/pepov/following{/other_user}","gists_url":"https://api.github.com/users/pepov/gists{/gist_id}","starred_url":"https://api.github.com/users/pepov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pepov/subscriptions","organizations_url":"https://api.github.com/users/pepov/orgs","repos_url":"https://api.github.com/users/pepov/repos","events_url":"https://api.github.com/users/pepov/events{/privacy}","received_events_url":"https://api.github.com/users/pepov/received_events","type":"User","site_admin":false},"body":"- Createdata repository and log directories\r\n- Add explicit environment variable declarations to replace nifi-env.sh\r\n- Remove obsolete chown commands after user has already been switched to nifi\r\n\r\nHow I tested the changes:\r\n- I've ran `mvn package -P docker` in the nifi-docker folder to build the image. \r\n- I've made sure that `docker run --rm -ti apache/nifi` runs and start nifi using the new image\r\n- Made sure that all files are owned by the nifi user under /opt/nifi: `docker run --rm -ti --entrypoint /bin/bash apache/nifi -c \"find /opt/nifi ! -user nifi\"`\r\n- Checked that the expected environment variables are set:\r\n```\r\ndocker run --rm -ti --entrypoint /bin/bash apache/nifi -c \"env | grep NIFI\"\r\nNIFI_HOME=/opt/nifi/nifi-1.7.0-SNAPSHOT\r\nNIFI_LOG_DIR=/opt/nifi/nifi-1.7.0-SNAPSHOT/logs\r\nNIFI_PID_DIR=/opt/nifi/nifi-1.7.0-SNAPSHOT/run\r\nNIFI_BASE_DIR=/opt/nifi\r\n```\r\n\r\nThank you for submitting a contribution to Apache NiFi.\r\n\r\nIn order to streamline the review of the contribution we ask you\r\nto ensure the following steps have been taken:\r\n\r\n### For all changes:\r\n- [x] Is there a JIRA ticket associated with this PR? Is it referenced \r\n     in the commit message?\r\n\r\n- [x] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen \"-\" character.\r\n\r\n- [x] Has your PR been rebased against the latest commit within the target branch (typically master)?\r\n\r\n- [x] Is your initial contribution a single, squashed commit?\r\n\r\n### For code changes:\r\n- [ ] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?\r\n- [ ] Have you written or updated unit tests to verify your changes?\r\n- [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? \r\n- [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?\r\n- [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?\r\n- [ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?\r\n\r\n### For documentation related changes:\r\n- [ ] Have you ensured that format looks appropriate for the output in which it is rendered?\r\n\r\n### Note:\r\nPlease ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.\r\n","created_at":"2018-05-30T08:00:33Z","updated_at":"2018-06-13T23:07:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f01b1a89154a2e4463f8324b5e1d071238080491","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/nifi/pulls/2747/commits","review_comments_url":"https://api.github.com/repos/apache/nifi/pulls/2747/comments","review_comment_url":"https://api.github.com/repos/apache/nifi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/nifi/issues/2747/comments","statuses_url":"https://api.github.com/repos/apache/nifi/statuses/0c4f9a0ba4b64e258386ef3526c7b44b1f4ba9f7","head":{"label":"pepov:NIFI-5249","ref":"NIFI-5249","sha":"0c4f9a0ba4b64e258386ef3526c7b44b1f4ba9f7","user":{"login":"pepov","id":682440,"node_id":"MDQ6VXNlcjY4MjQ0MA==","avatar_url":"https://avatars0.githubusercontent.com/u/682440?v=4","gravatar_id":"","url":"https://api.github.com/users/pepov","html_url":"https://github.com/pepov","followers_url":"https://api.github.com/users/pepov/followers","following_url":"https://api.github.com/users/pepov/following{/other_user}","gists_url":"https://api.github.com/users/pepov/gists{/gist_id}","starred_url":"https://api.github.com/users/pepov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pepov/subscriptions","organizations_url":"https://api.github.com/users/pepov/orgs","repos_url":"https://api.github.com/users/pepov/repos","events_url":"https://api.github.com/users/pepov/events{/privacy}","received_events_url":"https://api.github.com/users/pepov/received_events","type":"User","site_admin":false},"repo":{"id":134712367,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQ3MTIzNjc=","name":"nifi","full_name":"pepov/nifi","owner":{"login":"pepov","id":682440,"node_id":"MDQ6VXNlcjY4MjQ0MA==","avatar_url":"https://avatars0.githubusercontent.com/u/682440?v=4","gravatar_id":"","url":"https://api.github.com/users/pepov","html_url":"https://github.com/pepov","followers_url":"https://api.github.com/users/pepov/followers","following_url":"https://api.github.com/users/pepov/following{/other_user}","gists_url":"https://api.github.com/users/pepov/gists{/gist_id}","starred_url":"https://api.github.com/users/pepov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pepov/subscriptions","organizations_url":"https://api.github.com/users/pepov/orgs","repos_url":"https://api.github.com/users/pepov/repos","events_url":"https://api.github.com/users/pepov/events{/privacy}","received_events_url":"https://api.github.com/users/pepov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pepov/nifi","description":"Mirror of Apache NiFi","fork":true,"url":"https://api.github.com/repos/pepov/nifi","forks_url":"https://api.github.com/repos/pepov/nifi/forks","keys_url":"https://api.github.com/repos/pepov/nifi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pepov/nifi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pepov/nifi/teams","hooks_url":"https://api.github.com/repos/pepov/nifi/hooks","issue_events_url":"https://api.github.com/repos/pepov/nifi/issues/events{/number}","events_url":"https://api.github.com/repos/pepov/nifi/events","assignees_url":"https://api.github.com/repos/pepov/nifi/assignees{/user}","branches_url":"https://api.github.com/repos/pepov/nifi/branches{/branch}","tags_url":"https://api.github.com/repos/pepov/nifi/tags","blobs_url":"https://api.github.com/repos/pepov/nifi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pepov/nifi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pepov/nifi/git/refs{/sha}","trees_url":"https://api.github.com/repos/pepov/nifi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pepov/nifi/statuses/{sha}","languages_url":"https://api.github.com/repos/pepov/nifi/languages","stargazers_url":"https://api.github.com/repos/pepov/nifi/stargazers","contributors_url":"https://api.github.com/repos/pepov/nifi/contributors","subscribers_url":"https://api.github.com/repos/pepov/nifi/subscribers","subscription_url":"https://api.github.com/repos/pepov/nifi/subscription","commits_url":"https://api.github.com/repos/pepov/nifi/commits{/sha}","git_commits_url":"https://api.github.com/repos/pepov/nifi/git/commits{/sha}","comments_url":"https://api.github.com/repos/pepov/nifi/comments{/number}","issue_comment_url":"https://api.github.com/repos/pepov/nifi/issues/comments{/number}","contents_url":"https://api.github.com/repos/pepov/nifi/contents/{+path}","compare_url":"https://api.github.com/repos/pepov/nifi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pepov/nifi/merges","archive_url":"https://api.github.com/repos/pepov/nifi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pepov/nifi/downloads","issues_url":"https://api.github.com/repos/pepov/nifi/issues{/number}","pulls_url":"https://api.github.com/repos/pepov/nifi/pulls{/number}","milestones_url":"https://api.github.com/repos/pepov/nifi/milestones{/number}","notifications_url":"https://api.github.com/repos/pepov/nifi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pepov/nifi/labels{/name}","releases_url":"https://api.github.com/repos/pepov/nifi/releases{/id}","deployments_url":"https://api.github.com/repos/pepov/nifi/deployments","created_at":"2018-05-24T12:29:21Z","updated_at":"2018-06-04T09:52:01Z","pushed_at":"2018-06-12T07:58:30Z","git_url":"git://github.com/pepov/nifi.git","ssh_url":"git@github.com:pepov/nifi.git","clone_url":"https://github.com/pepov/nifi.git","svn_url":"https://github.com/pepov/nifi","homepage":"","size":122351,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"ee18ead16c7b0697560e27c63cf1dd06b1c38c4f","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":27911088,"node_id":"MDEwOlJlcG9zaXRvcnkyNzkxMTA4OA==","name":"nifi","full_name":"apache/nifi","owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/nifi","description":"Mirror of Apache NiFi","fork":false,"url":"https://api.github.com/repos/apache/nifi","forks_url":"https://api.github.com/repos/apache/nifi/forks","keys_url":"https://api.github.com/repos/apache/nifi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/nifi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/nifi/teams","hooks_url":"https://api.github.com/repos/apache/nifi/hooks","issue_events_url":"https://api.github.com/repos/apache/nifi/issues/events{/number}","events_url":"https://api.github.com/repos/apache/nifi/events","assignees_url":"https://api.github.com/repos/apache/nifi/assignees{/user}","branches_url":"https://api.github.com/repos/apache/nifi/branches{/branch}","tags_url":"https://api.github.com/repos/apache/nifi/tags","blobs_url":"https://api.github.com/repos/apache/nifi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/nifi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/nifi/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/nifi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/nifi/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/nifi/languages","stargazers_url":"https://api.github.com/repos/apache/nifi/stargazers","contributors_url":"https://api.github.com/repos/apache/nifi/contributors","subscribers_url":"https://api.github.com/repos/apache/nifi/subscribers","subscription_url":"https://api.github.com/repos/apache/nifi/subscription","commits_url":"https://api.github.com/repos/apache/nifi/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/nifi/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/nifi/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/nifi/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/nifi/contents/{+path}","compare_url":"https://api.github.com/repos/apache/nifi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/nifi/merges","archive_url":"https://api.github.com/repos/apache/nifi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/nifi/downloads","issues_url":"https://api.github.com/repos/apache/nifi/issues{/number}","pulls_url":"https://api.github.com/repos/apache/nifi/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/nifi/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/nifi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/nifi/labels{/name}","releases_url":"https://api.github.com/repos/apache/nifi/releases{/id}","deployments_url":"https://api.github.com/repos/apache/nifi/deployments","created_at":"2014-12-12T08:00:05Z","updated_at":"2018-06-13T20:01:00Z","pushed_at":"2018-06-13T21:09:01Z","git_url":"git://github.com/apache/nifi.git","ssh_url":"git@github.com:apache/nifi.git","clone_url":"https://github.com/apache/nifi.git","svn_url":"https://github.com/apache/nifi","homepage":"","size":122587,"stargazers_count":980,"watchers_count":980,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":927,"mirror_url":null,"archived":false,"open_issues_count":123,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":927,"open_issues":123,"watchers":980,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/nifi/pulls/2747"},"html":{"href":"https://github.com/apache/nifi/pull/2747"},"issue":{"href":"https://api.github.com/repos/apache/nifi/issues/2747"},"comments":{"href":"https://api.github.com/repos/apache/nifi/issues/2747/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/nifi/pulls/2747/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/nifi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/nifi/pulls/2747/commits"},"statuses":{"href":"https://api.github.com/repos/apache/nifi/statuses/0c4f9a0ba4b64e258386ef3526c7b44b1f4ba9f7"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jtstorck"}}