1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-25 02:04:06 +02:00

add nifi-arm

This commit is contained in:
kev 2018-02-03 09:59:36 +08:00
parent 38becaa618
commit e4d3946223
3 changed files with 54 additions and 1 deletions

View File

@ -14,7 +14,7 @@ WORKDIR $NIFI_HOME
RUN set -xe \
&& apk add --no-cache bash curl tar \
&& curl -sSL ${NIFI_URL} | tar xz --strip-components=1 \
&& curl -fSL ${NIFI_URL} | tar xz --strip-components=1 \
&& apk del curl tar \
&& addgroup -g 1000 nifi \
&& adduser -h ${NIFI_HOME} -s /bin/bash -G nifi -u 1000 -D -H nifi \

47
nifi/arm/Dockerfile Normal file
View File

@ -0,0 +1,47 @@
#
# 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
ARG NIFI_VERSION=1.5.0
ARG MIRROR=https://archive.apache.org/dist
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
# 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 \
&& mkdir -p ${NIFI_HOME}/conf/templates \
&& chown -R nifi:nifi ${NIFI_BASE_DIR} \
&& apt-get update \
&& apt-get install -y jq xmlstarlet
USER nifi
# 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}
# Web HTTP(s) & Socket Site-to-Site Ports
EXPOSE 8080 8443 10000
WORKDIR ${NIFI_HOME}
# Apply configuration and start NiFi
CMD ${NIFI_BASE_DIR}/scripts/start.sh

View File

@ -0,0 +1,6 @@
nifi:
image: easypi/nifi-arm
ports:
- "8080:8080"
- "10000:10000"
restart: always