nifi/minifi/minifi-docker/dockerhub
Ferenc Kis c55d600d0a
NIFI-12490 MiNiFi docker graceful shutdown
Signed-off-by: Csaba Bejan <bejan.csaba@gmail.com>

This closes #8145.
2023-12-09 14:52:38 +01:00
..
sh NIFI-12490 MiNiFi docker graceful shutdown 2023-12-09 14:52:38 +01:00
.dockerignore
DockerBuild.sh NIFI-12175 Standardized Docker Image Tags on Liberica Java 21 2023-10-18 16:00:00 -05:00
DockerImage.txt NIFI-11103 prepping for 2.0.0 line 2023-02-09 15:32:53 -07:00
DockerRun.sh NIFI-10701 Update MiNiFi docker base images to eclipse-temurin 2022-11-15 20:08:41 -05:00
Dockerfile NIFI-12175 Standardized Docker Image Tags on Liberica Java 21 2023-10-18 16:00:00 -05:00
README.md NIFI-11514 Flow JSON support and deprecating YAML format. Revised parameter generation. Generic refactors. 2023-08-18 11:33:23 +02:00

README.md

Docker Image Quickstart

Building

The Docker image can be built using the following command:

docker build -t apache/nifi-minifi:latest .

This build will result in an image tagged apache/nifi:latest

$ docker images
REPOSITORY               TAG                 IMAGE ID            CREATED                 SIZE
apache/nifi-minifi              latest              f0f564eed149        A long, long time ago   226MB

Note: The default version of NiFi specified by the Dockerfile is typically that of one that is unreleased if working from source. To build an image for a prior released version, one can override the MINIFI_VERSION build-arg with the following command:

docker build --build-arg=MINIFI_VERSION={Desired MiNiFi Version} -t apache/nifi-minifi:latest .

Running a container

Supplying configuration to a container

The primary means by which a MiNiFi instance is configured is via the flow.json.raw or the bootstrap.conf.

This can be accomplished through:

  • the use of volumes, and
  • overlaying the base image

Using volumes to provide configuration

The following example shows the usage of two volumes to provide both a flow.json.raw and a bootstrap.conf to the container instance. This makes use of configuration files on the host and maps them to be used by the MiNiFi instance. This is helpful in scenarios where a single image is used for a variety of configurations.

docker run -d \
    -v ~/minifi-conf/flow.json.raw:/opt/minifi/minifi-current/conf/flow.json.raw \
    -v ~/minifi-conf/bootstrap.conf:/opt/minifi/minifi-current/conf/bootstrap.conf \
    apache/nifi-minifi:latest

Using volumes to provide configuration

Alternatively, it is possible to create a custom image inheriting from the published image. Creating a Dockerfile extending from the Apache NiFi MiNiFi base image allows users to overlay the configuration permanently into a newly built and custom image. A simple example follows:

FROM apache/nifi-minifi

ADD flow.json.raw /opt/minifi/minifi-current/conf/flow.json.raw
ADD bootstrap.conf /opt/minifi/minifi-current/conf/bootstrap.conf

Building this Dockerfile will result in a custom image with the specified configuration files incorporated into the new image. This is best for applications where configuration is well defined and relatively static.

For more information, please consult Dockerfile Reference: FROM