apache/nifiThis image currently supports running in standalone mode either unsecured or with user authentication provided through:
The minimum to run a NiFi instance is as follows:
docker run --name nifi \ -p 8443:8443 \ -d \ apache/nifi:latest
This will provide a running instance, exposing the instance UI to the host system on at port 8443,
viewable at https://localhost:8443/nifi.
The default configuration generates a random username and password on startup. NiFi writes the generated credentials to the application log.
The following command can be used to find the generated credentials on operating systems with grep installed:
docker logs nifi | grep Generated
NiFi logs the generated credentials as follows:
Generated Username [USERNAME] Generated Password [PASSWORD]
Environment variables can be used to set the NiFi communication ports and hostname using the Docker '-e' switch as follows:
docker run --name nifi \ -p 9443:9443 \ -d \ -e NIFI_WEB_HTTPS_PORT='9443' \ apache/nifi:latest
Single User Authentication credentials can be specified using environment variables as follows:
docker run --name nifi \ -p 8443:8443 \ -d \ -e SINGLE_USER_CREDENTIALS_USERNAME=admin \ -e SINGLE_USER_CREDENTIALS_PASSWORD=ctsBtRBKHRAx69EqUghvvgEvjnaLjFEB \ apache/nifi:latest
Please note that the password must be 12 characters minimum, otherwise NiFi will generate a random username and password.
See secure.sh and start.sh scripts for supported environment variables.
In this configuration, the user will need to provide certificates and 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 8443: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
In this configuration, the user will need to provide certificates and associated configuration information. Optionally,
if the LDAP provider of interest is operating in LDAPS or START_TLS modes, certificates will additionally be needed.
Of particular note, is the AUTH environment variable which is set to ldap. Additionally, the user must provide a
DN as provided by the configured LDAP server 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 8443:8443 \ -e AUTH=ldap \ -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=admin,dc=example,dc=org' \ -e LDAP_AUTHENTICATION_STRATEGY='SIMPLE' \ -e LDAP_MANAGER_DN='cn=admin,dc=example,dc=org' \ -e LDAP_MANAGER_PASSWORD='password' \ -e LDAP_USER_SEARCH_BASE='dc=example,dc=org' \ -e LDAP_USER_SEARCH_FILTER='cn={0}' \ -e LDAP_IDENTITY_STRATEGY='USE_DN' \ -e LDAP_URL='ldap://ldap:389' \ -d \ apache/nifi:latest
-e LDAP_TLS_KEYSTORE: '' -e LDAP_TLS_KEYSTORE_PASSWORD: '' -e LDAP_TLS_KEYSTORE_TYPE: '' -e LDAP_TLS_TRUSTSTORE: '' -e LDAP_TLS_TRUSTSTORE_PASSWORD: '' -e LDAP_TLS_TRUSTSTORE_TYPE: ''
nifi.properties
| Property | Environment Variable |
|---|---|
| nifi.cluster.is.node | NIFI_CLUSTER_IS_NODE |
| nifi.cluster.node.address | NIFI_CLUSTER_ADDRESS |
| nifi.cluster.node.protocol.port | NIFI_CLUSTER_NODE_PROTOCOL_PORT |
| nifi.cluster.node.protocol.max.threads | NIFI_CLUSTER_NODE_PROTOCOL_MAX_THREADS |
| nifi.zookeeper.connect.string | NIFI_ZK_CONNECT_STRING |
| nifi.zookeeper.root.node | NIFI_ZK_ROOT_NODE |
| nifi.cluster.flow.election.max.wait.time | NIFI_ELECTION_MAX_WAIT |
| nifi.cluster.flow.election.max.candidates | NIFI_ELECTION_MAX_CANDIDATES |
state-management.xml
| Property Name | Environment Variable |
|---|---|
| Connect String | NIFI_ZK_CONNECT_STRING |
| Root Node | NIFI_ZK_ROOT_NODE |
Start the container:
docker run -d --name nifi apache/nifi
After NiFi has been started, it is possible to run toolkit commands against the running instance:
docker exec -ti nifi nifi-toolkit-current/bin/cli.sh nifi current-user anonymous
The following ports are specified by default in Docker 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 | *** |
| JVM Debugger | java.arg.debug | 8000 |
The Variable Registry can be configured for the docker image using the NIFI_VARIABLE_REGISTRY_PROPERTIES environment variable.
The JVM Memory initial and maximum heap size can be set using the NIFI_JVM_HEAP_INIT and NIFI_JVM_HEAP_MAX environment variables. These use values acceptable to the JVM Xmx and Xms parameters such as 1g or 512m.
The JVM Debugger can be enabled by setting the environment variable NIFI_JVM_DEBUGGER to any value.
NOTE: If NiFi is proxied at context paths other than the root path of the proxy, the paths need to be set in the nifi.web.proxy.context.path property, which can be assigned via the environment variable NIFI_WEB_PROXY_CONTEXT_PATH.
NOTE: If mapping the HTTPS port specifying trusted hosts should be provided for the property nifi.web.proxy.host. This property can be specified to running instances via specifying an environment variable at container instantiation of NIFI_WEB_PROXY_HOST.

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
在 Linux 系统配置镜像服务
在 Docker Desktop 配置镜像
Docker Compose 项目配置
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
MacOS OrbStack 容器配置
在宝塔面板一键配置镜像
Synology 群晖 NAS 配置
飞牛 fnOS 系统配置镜像
极空间 NAS 系统配置服务
爱快 iKuai 路由系统配置
绿联 NAS 系统配置镜像
QNAP 威联通 NAS 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
无需登录使用专属域名
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
免费版仅支持 Docker Hub 访问,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。
专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等;免费版仅支持 docker.io。
当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。
通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。
先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。
使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。
来自真实用户的反馈,见证轩辕镜像的优质服务