Search code examples
dockerdocker-composeapache-nifidocker-volume

Persist apache nifi flow.xml.gz file in docker volume


How can I persist the flow.xml.gz file in nifi docker container?
I am using a docker-compose file, it is giving me errors such as not finding certain files.
Didi you encounter the same issue?
Thanks

    version: "3.3"
services:
  nifi:
    image: apache/nifi
    volumes:
      - /home/ubuntu/nifi/conf:/opt/nifi/nifi-current/conf
      #- ./flow/flow.xml.gz:/opt/nifi/nifi-current/conf/flow.xml.gz
    ports:
      - "8080:8080"

Solution

  • Apparently NiFi doesn't allow you to only persist the flow.xml.gz file, it gives error and the container shuts.
    You need to persist the whole /opt/nifi/nifi-current/conf/ folder