Github user apiri commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1910#discussion_r127824242
--- Diff: nifi-docker/dockermaven/Dockerfile ---
@@ -16,32 +16,33 @@
# under the License.
#
-FROM openjdk:8
-MAINTAINER Apache NiFi <[email protected]>
+FROM openjdk:8-jre
+LABEL maintainer "Apache NiFi <[email protected]>"
ARG UID=1000
-ARG GID=50
+ARG GID=1000
ARG NIFI_VERSION
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`
-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
+
+USER nifi
ADD $NIFI_BINARY $NIFI_BASE_DIR
RUN chown -R nifi:nifi $NIFI_HOME
--- End diff --
But this causes the duplicate layer issue again. Bit of a different
environment as we are not able to add & chmod the files in the same sequence
given the nature of the ADD command. May just have to be a concession we make
for the local environment.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---