nifi/nifi-docker/dockerhub
Aldrin Piri c832a2ed7c NIFI-4530: This closes #2329. Initial support for two-way SSL user authentication in the Docker image.
Signed-off-by: joewitt <joewitt@apache.org>
2018-01-04 10:37:37 -05:00
..
sh NIFI-4530: This closes #2329. Initial support for two-way SSL user authentication in the Docker image. 2018-01-04 10:37:37 -05:00
.dockerignore NIFI-3260 Official Docker Image 2017-01-10 13:24:33 -05:00
DockerBuild.sh NIFI-4057 Docker Image is twice as large as necessary 2017-07-17 17:18:32 -04:00
DockerImage.txt NIFI-4412 Updating Docker Hub image version information to accommodate next release. 2017-10-02 14:20:40 -04:00
DockerRun.sh NIFI-3260 Official Docker Image 2017-01-10 13:24:33 -05:00
Dockerfile NIFI-4530: This closes #2329. Initial support for two-way SSL user authentication in the Docker image. 2018-01-04 10:37:37 -05:00
README.md NIFI-4530: This closes #2329. Initial support for two-way SSL user authentication in the Docker image. 2018-01-04 10:37:37 -05:00

README.md

Docker Image Quickstart

Capabilities

This image currently supports running in standalone mode either unsecured or with Two-Way SSL.

More capabilities will continue to be added and made available from the

Building

The Docker image can be built using the following command:

docker build -t apache/nifi:latest .

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

# user @ puter in ~/Development/code/apache/nifi/nifi-docker/dockerhub
$ docker images
REPOSITORY               TAG                 IMAGE ID            CREATED                 SIZE
apache/nifi              latest              f0f564eed149        A long, long time ago   1.62GB

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 NIFI_VERSION build-arg with the following command:

docker build --build-arg=NIFI_VERSION={Desired NiFi Version} -t apache/nifi:latest .

There is, however, no guarantee that older versions will work as properties have changed and evolved with subsequent releases. The configuration scripts are suitable for at least 1.4.0+.

Running a container

Standalone Instance, Unsecured

The minimum to run a NiFi instance is as follows:

docker run --name nifi \
  -p 18080:8080 \
  -d \
  apache/nifi:latest

This will provide a running instance, exposing the instance UI to the host system on at port 18080, viewable at http://localhost:18080/nifi.

Standalone Instance, Two-Way SSL

In this configuration, the user will need to provide certificates and the associated configuration information. Of particular note, is the AUTH environment variable which is set to tls. Additionally, the user must provide an the DN as provided by an accessing client certificate in the INITIAL_ADMIN_IDENTITY environment variable. This value will be used to seed the instance with an initial user with administrative privileges. Finally, this command makes use of a volume to provide certificates on the host system to the container instance.

docker run --name nifi \
  -v /User/dreynolds/certs/localhost:/opt/certs \
  -p 18443:8443 \
  -e AUTH=tls \
  -e KEYSTORE_PATH=/opt/certs/keystore.jks \
  -e KEYSTORE_TYPE=JKS \
  -e KEYSTORE_PASSWORD=QKZv1hSWAFQYZ+WU1jjF5ank+l4igeOfQRp+OSbkkrs \
  -e TRUSTSTORE_PATH=/opt/certs/truststore.jks \
  -e TRUSTSTORE_PASSWORD=rHkWR1gDNW3R9hgbeRsT3OM3Ue0zwGtQqcFKJD2EXWE \
  -e TRUSTSTORE_TYPE=JKS \
  -e INITIAL_ADMIN_IDENTITY='CN=Random User, O=Apache, OU=NiFi, C=US' \
  -d \
  apache/nifi:latest

Configuration Information

The following ports are specified by the Docker container for NiFi operation within the container and can be published to the host.

Function Property Port
HTTP Port nifi.web.http.port 8080
HTTPS Port nifi.web.https.port 8443
Remote Input Socket Port nifi.remote.input.socket.port 10000