Github user taftster commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1910#discussion_r123647502
  
    --- Diff: nifi-docker/dockerhub/Dockerfile ---
    @@ -16,37 +16,38 @@
     # under the License.
     #
     
    -FROM openjdk:8
    -MAINTAINER Apache NiFi <d...@nifi.apache.org>
    +FROM openjdk:8-jre
    +LABEL maintainer "Apache NiFi <d...@nifi.apache.org>"
     
     ARG UID=1000
    -ARG GID=50
    +ARG GID=1000
     ARG NIFI_VERSION=1.4.0
    +ARG MIRROR=https://archive.apache.org/dist
     
    -ENV NIFI_BASE_DIR /opt/nifi
    -ENV NIFI_HOME $NIFI_BASE_DIR/nifi-$NIFI_VERSION
    -ENV NIFI_BINARY_URL 
https://archive.apache.org/dist/nifi/$NIFI_VERSION/nifi-$NIFI_VERSION-bin.tar.gz
    +ENV NIFI_BASE_DIR /opt/nifi 
    +ENV NIFI_HOME=$NIFI_BASE_DIR/nifi-$NIFI_VERSION \
    +    NIFI_BINARY_URL=/nifi/$NIFI_VERSION/nifi-$NIFI_VERSION-bin.tar.gz
     
     # Setup NiFi user
    -RUN groupadd -g $GID nifi || groupmod -n nifi `getent group $GID | cut -d: 
-f1`
    -RUN useradd --shell /bin/bash -u $UID -g $GID -m nifi
    -RUN mkdir -p $NIFI_HOME
    +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
     
    -# Download, validate, and expand Apache NiFi binary.
    -RUN curl -fSL $NIFI_BINARY_URL -o 
$NIFI_BASE_DIR/nifi-$NIFI_VERSION-bin.tar.gz \
    -   && echo "$(curl $NIFI_BINARY_URL.sha256) 
*$NIFI_BASE_DIR/nifi-$NIFI_VERSION-bin.tar.gz" | sha256sum -c - \
    -   && tar -xvzf $NIFI_BASE_DIR/nifi-$NIFI_VERSION-bin.tar.gz -C 
$NIFI_BASE_DIR \
    -   && rm $NIFI_BASE_DIR/nifi-$NIFI_VERSION-bin.tar.gz
    -
    -RUN chown -R nifi:nifi $NIFI_HOME
    +USER nifi
     
    -# Web HTTP Port
    -EXPOSE 8080
    +# Download, validate, and expand Apache NiFi binary.
    +RUN curl -fSL $MIRROR/$NIFI_BINARY_URL -o 
$NIFI_BASE_DIR/nifi-$NIFI_VERSION-bin.tar.gz \
    +    && echo "$(curl 
https://archive.apache.org/dist/$NIFI_BINARY_URL.sha256) 
*$NIFI_BASE_DIR/nifi-$NIFI_VERSION-bin.tar.gz" | sha256sum -c - \
    +    && tar -xvzf $NIFI_BASE_DIR/nifi-$NIFI_VERSION-bin.tar.gz -C 
$NIFI_BASE_DIR \
    +    && rm $NIFI_BASE_DIR/nifi-$NIFI_VERSION-bin.tar.gz \
    +    && chown -R nifi:nifi $NIFI_HOME
    --- End diff --
    
    The chown here shouldn't be necessary?  Since NIFI_BASE_DIR has already 
been chowned to the NIFI user, which we're using for the curl statement.  Is 
that right?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to