We're working on a custom Node-RED Docker image that will have project mode enabled by default.
The workflow is the user will run the container and create a project or clone an existing one.
I would like to provide a custom lib folder for the image which would have a collection of flows/javascript snippets. Since the lib folder is at the project level I'm trying to figure out how I could manage to have a global lib folder at the image level. My first instinct would be to somehow copy the global lib folder to the correct path in settings.js although I'm not sure I can know the path of the project from there.
Any other thoughts on how to do this ?
Do you mean you want to pre-populate the <userDir>/lib folder with content? And you want that content to come from the checked-out project?
At the moment, there's no relationship between a project and the lib directory. You could pre-populate <userDir>/lib as part of your Docker build, but there's no way to trigger that when the user clones a new project within the image.