Docker image with custom lib folder

Hello,

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 ?

Thanks !

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.

I guess my question is, if I put pre-populate my data in <userDir>/lib, will it appear for the user if he creates/clones a project ?

The built-in library is completely unrelated to projects. The content will appear whatever the user does - with projects, without projects.

Thanks ! I was over-thinking then, already does what I need :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.