Apache NiFi: the famous ETL tool to integrate different data endpoints together provides a friendly GUI to control data pipelines even for non-techy people. For anyone who wants to play with Apache NiFi, running Apache NiFi on Docker is an easy solution to get quick access. Running Apache NiFi on Docker is a simple and hassle-free process if you know the port to access. This article explains how to get Apache NiFi running in Docker on a Linux machine.
If you are using Mac Silicon M1/M2, follow this article instead: How to Run Apache NiFi Docker on Mac M1?
Spin Up Apache NiFi on Docker
Step 1:
Pull the latest Nifi image from the docker repository.
Step 2:
Run Apache Nifi as a docker container.
Extract the Credentials from Logs
Step 1:
Run the following command to get the NiFi logs from the Docker container.
Step 2:
Look for the following line to get the port Apache NiFi is running.
Above line tells that the NiFi dashboard is running at port number 8443. This port number must be the same as the port number defined in the docker run command.
Scroll further up and look for the lines with the temporary username and password.
Copy the username and password.
In a production environment, the username and password must be configured manually. However, the scope of this article is limited to just spinning up a NiFi container for testing. Therefore, we can continue with the temporary username and password.
To start NiFi with your own username and password, use the following command instead:
Access Apache NiFi Dashboard
Step 1:
Visit https://localhost:8443/nifi. The browser may warn you that the connection is not private because the SSL certificate is not valid. Ignore the warning and proceed to the site.
Step 2:
Use the username and password copied in Step 4 to log in to the Apache NiFi dashboard.
If you find this article useful, please share your thoughts below. If you have any questions or issues with getting Apache NiFi running on Docker, you can ask your questions in the comments. Java Helps community will try our best to answer your questions.