2018-02-03 03:59:36 +02:00
|
|
|
#
|
|
|
|
# Dockerfile for nifi-arm
|
|
|
|
#
|
|
|
|
|
|
|
|
FROM arm32v7/openjdk:8-jre
|
|
|
|
LABEL maintainer="EasyPi Software Foundation"
|
|
|
|
LABEL site="https://nifi.apache.org"
|
|
|
|
|
|
|
|
ARG UID=1000
|
|
|
|
ARG GID=1000
|
2020-01-10 05:24:28 +02:00
|
|
|
ARG NIFI_VERSION=1.10.0
|
2019-02-25 12:40:04 +02:00
|
|
|
ARG BASE_URL=https://archive.apache.org/dist
|
|
|
|
ARG MIRROR_BASE_URL=${MIRROR_BASE_URL:-${BASE_URL}}
|
|
|
|
ARG NIFI_BINARY_PATH=${NIFI_BINARY_PATH:-/nifi/${NIFI_VERSION}/nifi-${NIFI_VERSION}-bin.zip}
|
|
|
|
ARG NIFI_TOOLKIT_BINARY_PATH=${NIFI_TOOLKIT_BINARY_PATH:-/nifi/${NIFI_VERSION}/nifi-toolkit-${NIFI_VERSION}-bin.zip}
|
2018-02-03 03:59:36 +02:00
|
|
|
|
2019-02-25 12:40:04 +02:00
|
|
|
ENV NIFI_BASE_DIR=/opt/nifi
|
|
|
|
ENV NIFI_HOME ${NIFI_BASE_DIR}/nifi-current
|
|
|
|
ENV NIFI_TOOLKIT_HOME ${NIFI_BASE_DIR}/nifi-toolkit-current
|
|
|
|
|
|
|
|
ENV NIFI_PID_DIR=${NIFI_HOME}/run
|
|
|
|
ENV NIFI_LOG_DIR=${NIFI_HOME}/logs
|
2018-02-03 03:59:36 +02:00
|
|
|
|
|
|
|
# Download scripts
|
|
|
|
RUN mkdir -p /opt/nifi/scripts/ \
|
|
|
|
&& cd /opt/nifi/scripts/ \
|
|
|
|
&& curl -fSL https://github.com/apache/nifi/archive/rel/nifi-${NIFI_VERSION}.tar.gz \
|
|
|
|
| tar xz --strip 4 nifi-rel-nifi-${NIFI_VERSION}/nifi-docker/dockerhub/sh/
|
|
|
|
|
|
|
|
# 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 \
|
2019-02-25 12:40:04 +02:00
|
|
|
&& mkdir -p ${NIFI_BASE_DIR} \
|
2018-02-03 03:59:36 +02:00
|
|
|
&& chown -R nifi:nifi ${NIFI_BASE_DIR} \
|
|
|
|
&& apt-get update \
|
2019-02-25 12:40:04 +02:00
|
|
|
&& apt-get install -y jq xmlstarlet procps
|
2018-02-03 03:59:36 +02:00
|
|
|
|
|
|
|
USER nifi
|
|
|
|
|
|
|
|
# Download, validate, and expand Apache NiFi binary.
|
2019-02-25 12:40:04 +02:00
|
|
|
RUN curl -fSL ${MIRROR_BASE_URL}/${NIFI_BINARY_PATH} -o ${NIFI_BASE_DIR}/nifi-${NIFI_VERSION}-bin.zip \
|
|
|
|
&& echo "$(curl ${BASE_URL}/${NIFI_BINARY_PATH}.sha256) *${NIFI_BASE_DIR}/nifi-${NIFI_VERSION}-bin.zip" | sha256sum -c - \
|
|
|
|
&& unzip ${NIFI_BASE_DIR}/nifi-${NIFI_VERSION}-bin.zip -d ${NIFI_BASE_DIR} \
|
|
|
|
&& rm ${NIFI_BASE_DIR}/nifi-${NIFI_VERSION}-bin.zip \
|
|
|
|
&& mv ${NIFI_BASE_DIR}/nifi-${NIFI_VERSION} ${NIFI_HOME} \
|
|
|
|
&& mkdir -p ${NIFI_HOME}/conf \
|
|
|
|
&& mkdir -p ${NIFI_HOME}/database_repository \
|
|
|
|
&& mkdir -p ${NIFI_HOME}/flowfile_repository \
|
|
|
|
&& mkdir -p ${NIFI_HOME}/content_repository \
|
|
|
|
&& mkdir -p ${NIFI_HOME}/provenance_repository \
|
|
|
|
&& mkdir -p ${NIFI_HOME}/state \
|
|
|
|
&& mkdir -p ${NIFI_LOG_DIR} \
|
|
|
|
&& ln -s ${NIFI_HOME} ${NIFI_BASE_DIR}/nifi-${NIFI_VERSION}
|
|
|
|
|
|
|
|
VOLUME ${NIFI_LOG_DIR} \
|
|
|
|
${NIFI_HOME}/conf \
|
|
|
|
${NIFI_HOME}/database_repository \
|
|
|
|
${NIFI_HOME}/flowfile_repository \
|
|
|
|
${NIFI_HOME}/content_repository \
|
|
|
|
${NIFI_HOME}/provenance_repository \
|
|
|
|
${NIFI_HOME}/state
|
|
|
|
|
|
|
|
# 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
|
2018-02-03 03:59:36 +02:00
|
|
|
|
|
|
|
# Web HTTP(s) & Socket Site-to-Site Ports
|
|
|
|
EXPOSE 8080 8443 10000
|
|
|
|
|
|
|
|
WORKDIR ${NIFI_HOME}
|
|
|
|
|
2019-02-25 12:40:04 +02:00
|
|
|
ENTRYPOINT ["../scripts/start.sh"]
|