Docker to test out my feature branch of my node in docker?

My goal is to use the latest node-red in docker to test out my feature branch of my node in docker.

I scarfed up the latest minimal docker container with:
docker run -it -p 2880:1880 -v node_red_data:/data --name mynodered nodered/node-red:latest-minimal
so I can test out my node-red-contrib-mytimeout code. I know I have a problem with a new feature (test case fails). But now I'm trying to figure out how to use docker, add the feature branch to nod-red inside docker. I attempted to use:
npm i -D https://github.com/linuxha/node-red-contrib-mytimeout#feature-pause-3.2.3
But node-red doesn't see the module.

Any suggestions?

Where exactly did you run the install command?

In
/usr/src/node-red
which is the default directory for user: node-red (no ~/.npm dir)

That won't work because Node-RED will only scan that directory at startup and any changes won't be persisted.

Best bet is to run it in /data since it is persisted to a volume and the new version of the node will be picked up when you restart the container.

The other option is to use npm pack to create a tgz file that can be uploaded to the palette manager to have it installed.

1 Like

@hardillb huge thanks, I'll take a look at both. I went the npm pack method. I fooled around with the /data but I got very confused as to where the files really were.

Good news is that I found the issue with my code. Now I just need to figure out what to do about it. :slight_smile:

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