mirror of https://github.com/apache/nifi.git
NIFI-11485 Added Toolkit to Registry Docker Image
This closes #7197
Signed-off-by: David Handermann <exceptionfactory@apache.org>
(cherry picked from commit fcf2446bb5
)
This commit is contained in:
parent
aefb278f32
commit
952d5f2561
|
@ -13,4 +13,4 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apache/nifi-registry:1.14.0
|
||||
apache/nifi-registry:2.0.0
|
||||
|
|
|
@ -31,6 +31,11 @@ ENV NIFI_REGISTRY_BINARY nifi-registry-${NIFI_REGISTRY_VERSION}-bin.zip
|
|||
ENV NIFI_REGISTRY_BINARY_PATH nifi/${NIFI_REGISTRY_VERSION}/${NIFI_REGISTRY_BINARY}
|
||||
ENV NIFI_REGISTRY_BINARY_URL ${MIRROR}/${NIFI_REGISTRY_BINARY_PATH}
|
||||
|
||||
ENV NIFI_TOOLKIT_HOME ${NIFI_REGISTRY_BASE_DIR}/nifi-toolkit-current
|
||||
ENV NIFI_TOOLKIT_BINARY nifi-toolkit-${NIFI_REGISTRY_VERSION}-bin.zip
|
||||
ENV NIFI_TOOLKIT_BINARY_PATH nifi/${NIFI_REGISTRY_VERSION}/${NIFI_TOOLKIT_BINARY}
|
||||
ENV NIFI_TOOLKIT_BINARY_URL ${MIRROR}/${NIFI_TOOLKIT_BINARY_PATH}
|
||||
|
||||
ADD sh/ ${NIFI_REGISTRY_BASE_DIR}/scripts/
|
||||
RUN chmod -R +x ${NIFI_REGISTRY_BASE_DIR}/scripts/*.sh
|
||||
|
||||
|
@ -46,6 +51,14 @@ RUN groupadd -g ${GID} nifi || groupmod -n nifi `getent group ${GID} | cut -d: -
|
|||
|
||||
USER nifi
|
||||
|
||||
# Download, validate, and expand Apache NiFi Toolkit binary.
|
||||
RUN curl -fSL ${NIFI_TOOLKIT_BINARY_URL} -o ${NIFI_REGISTRY_BASE_DIR}/${NIFI_TOOLKIT_BINARY} \
|
||||
&& echo "$(curl ${NIFI_TOOLKIT_BINARY_URL}.sha256) *${NIFI_REGISTRY_BASE_DIR}/${NIFI_TOOLKIT_BINARY}" | sha256sum -c - \
|
||||
&& unzip ${NIFI_REGISTRY_BASE_DIR}/${NIFI_TOOLKIT_BINARY} -d ${NIFI_REGISTRY_BASE_DIR} \
|
||||
&& rm ${NIFI_REGISTRY_BASE_DIR}/${NIFI_TOOLKIT_BINARY} \
|
||||
&& mv ${NIFI_REGISTRY_BASE_DIR}/nifi-toolkit-${NIFI_REGISTRY_VERSION} ${NIFI_TOOLKIT_HOME} \
|
||||
&& ln -s ${NIFI_TOOLKIT_HOME} ${NIFI_REGISTRY_BASE_DIR}/nifi-toolkit-${NIFI_REGISTRY_VERSION}
|
||||
|
||||
# Download, validate, and expand Apache NiFi-Registry binary.
|
||||
RUN curl -fSL ${NIFI_REGISTRY_BINARY_URL} -o ${NIFI_REGISTRY_BASE_DIR}/${NIFI_REGISTRY_BINARY} \
|
||||
&& echo "$(curl ${NIFI_REGISTRY_BINARY_URL}.sha256) *${NIFI_REGISTRY_BASE_DIR}/${NIFI_REGISTRY_BINARY}" | sha256sum -c - \
|
||||
|
|
|
@ -24,9 +24,11 @@ ARG NIFI_REGISTRY_BINARY
|
|||
ARG NIFI_REGISTRY_BINARY_NAME
|
||||
ARG NIFI_REGISTRY_SCRIPTS
|
||||
ARG NIFI_REGISTRY_VERSION=1.22.0
|
||||
ARG NIFI_TOOLKIT_BINARY
|
||||
|
||||
ENV NIFI_REGISTRY_BASE_DIR /opt/nifi-registry
|
||||
ENV NIFI_REGISTRY_HOME ${NIFI_REGISTRY_BASE_DIR}/nifi-registry-current
|
||||
ENV NIFI_TOOLKIT_HOME ${NIFI_REGISTRY_BASE_DIR}/nifi-toolkit-current
|
||||
|
||||
ADD $NIFI_REGISTRY_SCRIPTS ${NIFI_REGISTRY_BASE_DIR}/scripts/
|
||||
RUN chmod -R +x ${NIFI_REGISTRY_BASE_DIR}/scripts/*.sh \
|
||||
|
@ -38,6 +40,12 @@ RUN unzip ${NIFI_REGISTRY_BASE_DIR}/${NIFI_REGISTRY_BINARY_NAME} -d ${NIFI_REGIS
|
|||
&& rm ${NIFI_REGISTRY_BASE_DIR}/${NIFI_REGISTRY_BINARY_NAME} \
|
||||
&& ln -s ${NIFI_REGISTRY_BASE_DIR}/nifi-registry-${NIFI_REGISTRY_VERSION} ${NIFI_REGISTRY_HOME}
|
||||
|
||||
COPY $NIFI_TOOLKIT_BINARY $NIFI_REGISTRY_BASE_DIR
|
||||
RUN unzip ${NIFI_REGISTRY_BASE_DIR}/nifi-toolkit-${NIFI_REGISTRY_VERSION}-bin.zip -d ${NIFI_REGISTRY_BASE_DIR} \
|
||||
&& rm ${NIFI_REGISTRY_BASE_DIR}/nifi-toolkit-${NIFI_REGISTRY_VERSION}-bin.zip \
|
||||
&& mv ${NIFI_REGISTRY_BASE_DIR}/nifi-toolkit-${NIFI_REGISTRY_VERSION} ${NIFI_TOOLKIT_HOME} \
|
||||
&& ln -s ${NIFI_TOOLKIT_HOME} ${NIFI_REGISTRY_BASE_DIR}/nifi-toolkit-${NIFI_REGISTRY_VERSION}
|
||||
|
||||
|
||||
FROM eclipse-temurin:11-jre
|
||||
LABEL maintainer="Apache NiFi Registry <dev@nifi.apache.org>"
|
||||
|
@ -48,6 +56,7 @@ ARG GID=1000
|
|||
|
||||
ENV NIFI_REGISTRY_BASE_DIR /opt/nifi-registry
|
||||
ENV NIFI_REGISTRY_HOME ${NIFI_REGISTRY_BASE_DIR}/nifi-registry-current
|
||||
ENV NIFI_TOOLKIT_HOME ${NIFI_REGISTRY_BASE_DIR}/nifi-toolkit-current
|
||||
|
||||
COPY --chown=${UID}:${GID} --from=artifactbase $NIFI_REGISTRY_BASE_DIR $NIFI_REGISTRY_BASE_DIR
|
||||
|
||||
|
|
|
@ -61,6 +61,22 @@
|
|||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-toolkit-for-docker</id>
|
||||
<phase>process-sources</phase>
|
||||
<configuration>
|
||||
<target name="copy toolkit assembly to nifi-registry-docker for image build">
|
||||
<copy todir="${project.basedir}/target" overwrite="true" flatten="true">
|
||||
<fileset dir="${project.basedir}/../../../nifi-toolkit/nifi-toolkit-assembly/target" includes="*.zip">
|
||||
<include name="*.zip" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
@ -90,6 +106,7 @@
|
|||
<NIFI_REGISTRY_SCRIPTS>target/sh</NIFI_REGISTRY_SCRIPTS>
|
||||
<NIFI_REGISTRY_BINARY>target/nifi-registry-${project.version}-bin.zip</NIFI_REGISTRY_BINARY>
|
||||
<NIFI_REGISTRY_BINARY_NAME>nifi-registry-${project.version}-bin.zip</NIFI_REGISTRY_BINARY_NAME>
|
||||
<NIFI_TOOLKIT_BINARY>target/nifi-toolkit-${project.version}-bin.zip</NIFI_TOOLKIT_BINARY>
|
||||
</args>
|
||||
</build>
|
||||
</image>
|
||||
|
|
Loading…
Reference in New Issue