tl:dr I made this to make the NiFi docker image smaller, let me know if it's useful: https://github.com/josephthweatt/skinifi
Hello everyone, My team has been been using NiFi for a couple months now and we have recently begun adding the docker image into a stack. I noticed that NiFi's docker image is pretty big (1.91 GB) and takes a while to download as a result. Adding to that, the image itself is only a part of the multistage build. After adding custom processors we were actually looking at something closer to 2.8 GB, making itesting/building/downloading a nightmare. The main reason the image is so large is that the lib is full of nar files, the majority of which are never used. Those same nars are then duplicated to the work directory when nifi is running, making it even larger. My solution to this was the github project above. Basically if you provide it a Flow from a registry or a template it will find which nars are needed to run nifi and pack them into a smaller image. A bare-bones image (NiFi with only the processors needed to run without breaking) is about 680 MB and in my team's case we got the file size reduced to 1.2 GB. Integration tests for our stack also halved as a result, from 35 mins down to 17. I'll probably continue to add some useful features that I feel we need, but I figured I should put this out there if anyone else wanted to try it. Suggestions are also appreciated!
