mirror of https://github.com/apache/nifi.git
NIFI-12147 Cleaned poms, updated Dockerfile, fixed Jersey version to get appropriate bundled ASM
This closes #7819 Signed-off-by: Mike Thomsen <mthomsen@apache.org>
This commit is contained in:
parent
67ba13796e
commit
9ba81c9564
|
@ -17,7 +17,7 @@
|
|||
# under the License.
|
||||
#
|
||||
|
||||
ARG IMAGE_NAME=bellsoft/liberica-openjdk-alpine
|
||||
ARG IMAGE_NAME=bellsoft/liberica-openjdk-debian
|
||||
ARG IMAGE_TAG=21
|
||||
FROM ${IMAGE_NAME}:${IMAGE_TAG}
|
||||
ARG MAINTAINER="Apache NiFi <dev@nifi.apache.org>"
|
||||
|
@ -40,7 +40,9 @@ ENV NIFI_PID_DIR=${NIFI_HOME}/run
|
|||
ENV NIFI_LOG_DIR=${NIFI_HOME}/logs
|
||||
|
||||
ADD sh/ ${NIFI_BASE_DIR}/scripts/
|
||||
RUN chmod -R +x ${NIFI_BASE_DIR}/scripts/*.sh
|
||||
RUN chmod -R +x ${NIFI_BASE_DIR}/scripts/*.sh \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y unzip
|
||||
|
||||
# Setup NiFi user and create necessary directories
|
||||
RUN groupadd -g ${GID} nifi || groupmod -n nifi `getent group ${GID} | cut -d: -f1` \
|
||||
|
|
|
@ -39,26 +39,34 @@
|
|||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>dockerfile-maven-plugin</artifactId>
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default</id>
|
||||
<id>build-docker-image</id>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<buildArgs>
|
||||
<IMAGE_NAME>${docker.image.name}</IMAGE_NAME>
|
||||
<IMAGE_TAG>${docker.image.tag}</IMAGE_TAG>
|
||||
<MAINTAINER>${docker.maintainer}</MAINTAINER>
|
||||
<UID>1000</UID>
|
||||
<GID>1000</GID>
|
||||
<NIFI_VERSION>${docker.nifi.version}</NIFI_VERSION>
|
||||
</buildArgs>
|
||||
<repository>apache/nifi</repository>
|
||||
<!-- Right now we can only test against the latest released NiFi version to check our Dockerfile -->
|
||||
<tag>${project.version}-dockerhub</tag>
|
||||
<images>
|
||||
<image>
|
||||
<name>apache/nifi</name>
|
||||
<build>
|
||||
<tags>
|
||||
<tag>${project.version}-dockerhub</tag>
|
||||
</tags>
|
||||
<dockerFile>Dockerfile</dockerFile>
|
||||
<contextDir>${project.basedir}</contextDir>
|
||||
<optimise>true</optimise>
|
||||
<args>
|
||||
<NIFI_VERSION>${project.version}</NIFI_VERSION>
|
||||
<NIFI_BINARY>target/nifi-${project.version}-bin.zip</NIFI_BINARY>
|
||||
<NIFI_TOOLKIT_BINARY>target/nifi-toolkit-${project.version}-bin.zip</NIFI_TOOLKIT_BINARY>
|
||||
<NIFI_SCRIPTS>target/sh</NIFI_SCRIPTS>
|
||||
</args>
|
||||
</build>
|
||||
</image>
|
||||
</images>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
|
|
@ -54,13 +54,9 @@
|
|||
<contextDir>${project.basedir}</contextDir>
|
||||
<optimise>true</optimise>
|
||||
<args>
|
||||
<IMAGE_NAME>${docker.image.name}</IMAGE_NAME>
|
||||
<IMAGE_TAG>${docker.image.tag}</IMAGE_TAG>
|
||||
<UID>1000</UID>
|
||||
<GID>1000</GID>
|
||||
<NIFI_VERSION>${project.version}</NIFI_VERSION>
|
||||
<NIFI_BINARY>target/nifi-${nifi.version}-bin.zip</NIFI_BINARY>
|
||||
<NIFI_TOOLKIT_BINARY>target/nifi-toolkit-${nifi.version}-bin.zip</NIFI_TOOLKIT_BINARY>
|
||||
<NIFI_BINARY>target/nifi-${project.version}-bin.zip</NIFI_BINARY>
|
||||
<NIFI_TOOLKIT_BINARY>target/nifi-toolkit-${project.version}-bin.zip</NIFI_TOOLKIT_BINARY>
|
||||
<NIFI_SCRIPTS>target/sh</NIFI_SCRIPTS>
|
||||
</args>
|
||||
</build>
|
||||
|
|
|
@ -21,12 +21,6 @@ language governing permissions and limitations under the License. -->
|
|||
<artifactId>nifi-docker</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<nifi.version>${project.version}</nifi.version>
|
||||
<docker.image.name>bellsoft/liberica-openjdk-debian</docker.image.name>
|
||||
<docker.image.tag>21</docker.image.tag>
|
||||
</properties>
|
||||
|
||||
<modules>
|
||||
<module>dockermaven</module>
|
||||
<module>dockerhub</module>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
# under the License.
|
||||
#
|
||||
|
||||
FROM eclipse-temurin:11-jre AS artifactbase
|
||||
FROM bellsoft/liberica-openjdk-debian:21 AS artifactbase
|
||||
LABEL maintainer="Apache NiFi <dev@nifi.apache.org>"
|
||||
LABEL site="https://nifi.apache.org"
|
||||
|
||||
|
@ -47,7 +47,7 @@ RUN unzip ${NIFI_REGISTRY_BASE_DIR}/nifi-toolkit-${NIFI_REGISTRY_VERSION}-bin.zi
|
|||
&& ln -s ${NIFI_TOOLKIT_HOME} ${NIFI_REGISTRY_BASE_DIR}/nifi-toolkit-${NIFI_REGISTRY_VERSION}
|
||||
|
||||
|
||||
FROM eclipse-temurin:11-jre
|
||||
FROM bellsoft/liberica-openjdk-debian:21
|
||||
LABEL maintainer="Apache NiFi Registry <dev@nifi.apache.org>"
|
||||
LABEL site="https://nifi.apache.org"
|
||||
|
||||
|
@ -58,18 +58,17 @@ 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
|
||||
|
||||
# Setup NiFi user and create necessary directories
|
||||
RUN groupadd -g ${GID} nifi || groupmod -n nifi `getent group ${GID} | cut -d: -f1` \
|
||||
&& useradd --shell /bin/bash -u ${UID} -g ${GID} -m nifi \
|
||||
&& chown -R nifi:nifi ${NIFI_REGISTRY_BASE_DIR} \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y jq xmlstarlet procps \
|
||||
&& apt-get -y autoremove \
|
||||
&& apt-get clean autoclean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
COPY --chown=nifi:nifi --from=artifactbase $NIFI_REGISTRY_BASE_DIR $NIFI_REGISTRY_BASE_DIR
|
||||
|
||||
USER nifi
|
||||
|
||||
# Web HTTP(s) ports
|
||||
|
|
|
@ -100,8 +100,6 @@
|
|||
<dockerFile>Dockerfile</dockerFile>
|
||||
<contextDir>${project.basedir}</contextDir>
|
||||
<args>
|
||||
<UID>1000</UID>
|
||||
<GID>1000</GID>
|
||||
<NIFI_REGISTRY_VERSION>${project.version}</NIFI_REGISTRY_VERSION>
|
||||
<NIFI_REGISTRY_SCRIPTS>target/sh</NIFI_REGISTRY_SCRIPTS>
|
||||
<NIFI_REGISTRY_BINARY>target/nifi-registry-${project.version}-bin.zip</NIFI_REGISTRY_BINARY>
|
||||
|
|
20
pom.xml
20
pom.xml
|
@ -136,7 +136,7 @@
|
|||
<ozone.version>1.2.1</ozone.version>
|
||||
<gcs.version>2.1.5</gcs.version>
|
||||
<aspectj.version>1.9.20.1</aspectj.version>
|
||||
<jersey.bom.version>2.39.1</jersey.bom.version>
|
||||
<jersey.bom.version>2.40</jersey.bom.version>
|
||||
<log4j2.version>2.20.0</log4j2.version>
|
||||
<logback.version>1.3.11</logback.version>
|
||||
<mockito.version>5.5.0</mockito.version>
|
||||
|
@ -761,7 +761,6 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.11.0</version>
|
||||
<configuration>
|
||||
<fork>true</fork>
|
||||
<showDeprecation>${maven.compiler.showDeprecation}</showDeprecation>
|
||||
|
@ -772,7 +771,6 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>${surefire.version}</version>
|
||||
<configuration>
|
||||
<systemPropertyVariables>
|
||||
<java.awt.headless>true</java.awt.headless>
|
||||
|
@ -791,7 +789,6 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>3.6.0</version>
|
||||
<configuration>
|
||||
<tarLongFileMode>gnu</tarLongFileMode>
|
||||
</configuration>
|
||||
|
@ -799,12 +796,10 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>jaxb2-maven-plugin</artifactId>
|
||||
<version>2.5.0</version>
|
||||
<configuration>
|
||||
<noGeneratedHeaderComments>true</noGeneratedHeaderComments>
|
||||
</configuration>
|
||||
|
@ -812,12 +807,10 @@
|
|||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.5.0</version>
|
||||
<configuration>
|
||||
<failOnError>false</failOnError>
|
||||
<quiet>true</quiet>
|
||||
|
@ -832,7 +825,6 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
<version>3.0.1</version>
|
||||
<configuration>
|
||||
<useReleaseProfile>true</useReleaseProfile>
|
||||
<releaseProfiles>apache-release</releaseProfiles>
|
||||
|
@ -858,22 +850,18 @@
|
|||
<plugin>
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>0.43.4</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>buildnumber-maven-plugin</artifactId>
|
||||
<version>3.2.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr3-maven-plugin</artifactId>
|
||||
<version>3.5.3</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<version>3.3.0</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.puppycrawl.tools</groupId>
|
||||
|
@ -885,12 +873,10 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>3.6.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.rat</groupId>
|
||||
<artifactId>apache-rat-plugin</artifactId>
|
||||
<version>0.15</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
|
@ -898,7 +884,6 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.nifi</groupId>
|
||||
<artifactId>nifi-nar-maven-plugin</artifactId>
|
||||
<version>${nifi.nar.maven.plugin.version}</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<enforceDocGeneration>true</enforceDocGeneration>
|
||||
|
@ -907,7 +892,6 @@
|
|||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
<version>1.6.13</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<stagingProgressTimeoutMinutes>15</stagingProgressTimeoutMinutes>
|
||||
|
@ -918,7 +902,6 @@
|
|||
<plugin>
|
||||
<groupId>org.jvnet.jaxb2.maven2</groupId>
|
||||
<artifactId>maven-jaxb2-plugin</artifactId>
|
||||
<version>0.15.3</version>
|
||||
<configuration>
|
||||
<noFileHeader>true</noFileHeader>
|
||||
</configuration>
|
||||
|
@ -926,7 +909,6 @@
|
|||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<version>3.4.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>enforce-maven-version</id>
|
||||
|
|
Loading…
Reference in New Issue