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

**URL:** <https://discourse.nodered.org/t/docker-to-test-out-my-feature-branch-of-my-node-in-docker/59508>\
**Category:** Developing Nodes\
**Tags:** docker\
**Created:** [7 March 2022 19:13 UTC](https://discourse.nodered.org/t/docker-to-test-out-my-feature-branch-of-my-node-in-docker/59508 "2022-03-07T19:13:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ncherry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ncherry/32/27_2.png) [@ncherry](https://discourse.nodered.org/u/ncherry)\
**Post date:** [7 March 2022 19:13 UTC](https://discourse.nodered.org/t/docker-to-test-out-my-feature-branch-of-my-node-in-docker/59508/1 "2022-03-07T19:13:35Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)\
**Post date:** [7 March 2022 19:17 UTC](https://discourse.nodered.org/t/docker-to-test-out-my-feature-branch-of-my-node-in-docker/59508/2 "2022-03-07T19:17:26Z")

</div>

Where exactly did you run the install command?

---

<div class="post-metadata">

**Author:** ![ncherry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ncherry/32/27_2.png) [@ncherry](https://discourse.nodered.org/u/ncherry)\
**Post date:** [7 March 2022 19:27 UTC](https://discourse.nodered.org/t/docker-to-test-out-my-feature-branch-of-my-node-in-docker/59508/3 "2022-03-07T19:27:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)\
**Post date:** [7 March 2022 19:41 UTC](https://discourse.nodered.org/t/docker-to-test-out-my-feature-branch-of-my-node-in-docker/59508/4 "2022-03-07T19:41:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ncherry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ncherry/32/27_2.png) [@ncherry](https://discourse.nodered.org/u/ncherry)\
**Post date:** [8 March 2022 13:09 UTC](https://discourse.nodered.org/t/docker-to-test-out-my-feature-branch-of-my-node-in-docker/59508/5 "2022-03-08T13:09:47Z")

</div>

@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. 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [22 March 2022 13:10 UTC](https://discourse.nodered.org/t/docker-to-test-out-my-feature-branch-of-my-node-in-docker/59508/6 "2022-03-22T13:10:35Z")

</div>

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