Custom Node in Docker

Hello I have node red running in Docker and i would like to create Custom Nodes.
Everytime i try it, the directory with the files needed for a node gets deleted after some time and i cant see the node on the node-red dashboard.
Can somebody tell me in which directory the custom nodes needs to be saved to make it visible on the dashboard or has some other useful information for creating custom nodes for node red in Docker ?

Thanks a lot in advance.

You should do the development in a local directory and then map it to the container.
Like so:

    Host
    ~/node-develop
    ├── node-data
    └── node-dev

The docker run would then look like this:

$ docker run  -it -p 1880:1880 -v ~/node-develop/node-data:/data -v ~/node-develop/node-dev:/node-dev --name devnodered nodered/node-red-docker:v8

Thank you very much but i already did it this way. Node red seems to ignore my own nodes...

Do you use npm link ? like so?
examples

1 Like

I tried to use npm link in the docker console but there are errors i cannot fix. Is there any other way to create a node in Docker?

I tried writing a .js, a .html and a json package file and saving them to a volume i created for the node-red modules but nothing seems to work..

Yeah, there's a problem with npm link. I didn't test it, but could that help?
https://properdesign.co.uk/developing-a-new-node-module-in-a-docker-container-without-using-npm-link/

Thank you very very much!!

Is the link helpful?
I'm currently setting up my development environment under Docker and will probably stumble upon the same problem.

I am going to try it out now and then tell you as soon as i get some results :slight_smile:

Unfortunately the Link didn't help but i managed to create a Node and make it visible on the node-RED dashboard. So if you stumble upon any problems feel free to ask me and i will try to help you.

Thank you so much for your feedback.
Well, at least I managed the debugging under Docker;-)

Hi guys,
thanks for discussing this as the link helped me a bit, but kinda had to modify it little bit.

now running docker-compose with Dockerfile all happy with extra packages in alpine.

If someone interested, please ask for the files. :thinking:

I would be interested :wink:

Hi,
I am facing the same problem. I am unable to deploy any custom nodes in docker. can you please help

Hi, i am sorry but as i worked on that project a very long time ago i do not really remember what made it work in the end. :frowning: