Github user pepov commented on a diff in the pull request: https://github.com/apache/nifi/pull/2747#discussion_r195301228 --- Diff: nifi-docker/dockermaven/Dockerfile --- @@ -26,23 +26,33 @@ ARG NIFI_BINARY ENV NIFI_BASE_DIR /opt/nifi ENV NIFI_HOME $NIFI_BASE_DIR/nifi-$NIFI_VERSION - -# Setup NiFi user -RUN groupadd -g $GID nifi || groupmod -n nifi `getent group $GID | cut -d: -f1` \ - && useradd --shell /bin/bash -u $UID -g $GID -m nifi \ - && mkdir -p $NIFI_HOME/conf/templates \ - && chown -R nifi:nifi $NIFI_BASE_DIR +ENV NIFI_PID_DIR=${NIFI_HOME}/run +ENV NIFI_LOG_DIR=${NIFI_HOME}/logs ADD $NIFI_BINARY $NIFI_BASE_DIR -RUN chown -R nifi:nifi $NIFI_HOME +# Setup NiFi user and create necessary directories +RUN groupadd -g ${GID} nifi || groupmod -n nifi `getent group ${GID} | cut -d: -f1` \ + && useradd --shell /bin/bash -u ${UID} -g ${GID} -m nifi \ + && mkdir -p ${NIFI_HOME}/conf/templates \ + && mkdir -p $NIFI_BASE_DIR/data \ + && mkdir -p $NIFI_BASE_DIR/flowfile_repository \ + && mkdir -p $NIFI_BASE_DIR/content_repository \ + && mkdir -p $NIFI_BASE_DIR/provenance_repository \ + && mkdir -p $NIFI_LOG_DIR \ + && chown -R nifi:nifi ${NIFI_BASE_DIR} \ + && apt-get update \ + && apt-get install -y jq xmlstarlet procps USER nifi -# Web HTTP Port & Remote Site-to-Site Ports -EXPOSE 8080 8181 +# Clear nifi-env.sh in favour of configuring all environment variables in the Dockerfile +RUN echo "#!/bin/sh\n" > $NIFI_HOME/bin/nifi-env.sh + +# Web HTTP(s) & Socket Site-to-Site Ports +EXPOSE 8080 8443 10000 -WORKDIR $NIFI_HOME +WORKDIR ${NIFI_HOME} # Startup NiFi ENTRYPOINT ["bin/nifi.sh"] -CMD ["run"] +CMD ["run"] --- End diff -- Ctrl-C works for me, even if it's somewhat slow while nifi is booting (faster when already booted). The dockermaven image does not contain the wrapper scripts that the dockerhub one does, this is why tailing and sending all logs to stdout doesn't work. I wasn't sure that was intentional or not but I can add it to make the two environments more similar.
---