
Provides a Dockerfile and associated scripts for configuring an instance of Apache NiFi to run with certificate authentication.
From your checkout directory:
Build the image
docker build .
Run the image
standalone mode
docker run -i -t --rm \
-p 8443:8443 \
-v ${cert_path}:/opt/certs \
-v $(readlink -f ./authorized-users.xml):/opt/nifi/conf/authorized-users.xml \
-e KEYSTORE_PATH=/opt/certs/keystore.jks \
-e KEYSTORE_TYPE=JKS \
-e KEYSTORE_PASSWORD=password \
-e TRUSTSTORE_PATH=/opt/certs/truststore.jks \
-e TRUSTSTORE_PASSWORD=password \
-e TRUSTSTORE_TYPE=JKS \
-e JVM_HEAP_START=-Xms300m \
-e JVM_HEAP_MAX=-Xmx500m \
-e ARCHIVE_ENABLED=false \
-e REPOSITORY_INDEX_THREADS=2 \
-e NIFI_LOGGING_LEVEL=ERROR \
aldrin/apache-nifi
cluster mode (without security)
docker run -i -t --rm \
-p 8443:8443 \
-e DISABLE_SSL=true \
-e JVM_HEAP_START=-Xms300m \
-e JVM_HEAP_MAX=-Xmx500m \
-e ARCHIVE_ENABLED=false \
-e REPOSITORY_INDEX_THREADS=2 \
-e NIFI_LOGGING_LEVEL=ERROR \
-e NIFI_CLUSTER_IS_NODE=true \
-e NIFI_CLUSTER_NODE_ADDRESS=localhost \
-e NIFI_CLUSTER_NODE_PROTOCOL_PORT=8888 \
-e NIFI_ZOOKEEPER_CONNECT_STRING=zookeeper:2181 \
aldrin/apache-nifi
-p 8443:8443
exposes the UI at port 8443 on the Docker host system
-v ${cert_path}:/opt/certs
maps the 'cert_path' location on the host system to the container as the source of the relevant keystores
-i -t Allocates a TTY and keeps STDIN open
-v $(readlink -f ./authorized-users.xml):/opt/nifi/conf/authorized-users.xml Maps an authorized-users.xml into the container over the default one provided
Wait for the image to initalize
2015-03-21 18:14:37,879 INFO [main] org.apache.nifi.web.server.JettyServer NiFi has started. The UI is available at the following URLs:
2015-03-21 18:14:37,880 INFO [main] org.apache.nifi.web.server.JettyServer https://172.17.0.37:443/nifi
2015-03-21 18:14:37,880 INFO [main] org.apache.nifi.web.server.JettyServer https://127.0.0.1:443/nifi
2015-03-21 18:14:37,880 INFO [main] org.apache.nifi.NiFi Controller initialization took 4572051363 nanoseconds.
Access through your Docker host system
https://localhost:8443/nifi
Stopping
Ctrl+C to send the interrupt to the container.docker stop <container id> or docker kill <container id>NIFI_HOME via the ENV command/opt/certs${NIFI_HOME}/flowfile_repository${NIFI_HOME}/content_repository${NIFI_HOME}/database_repository${NIFI_HOME}/provenance_repositoryContent type
Image
Digest
Size
1.1 GB
Last updated
over 9 years ago
docker pull siweiwang/nifi