# Custom Node in Docker

**URL:** <https://discourse.nodered.org/t/custom-node-in-docker/6835>\
**Category:** General\
**Created:** [15 January 2019 09:44 UTC](https://discourse.nodered.org/t/custom-node-in-docker/6835 "2019-01-15T09:44:10Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karina25](https://avatars.discourse-cdn.com/v4/letter/k/7ba0ec/32.png) [@Karina25](https://discourse.nodered.org/u/Karina25)\
**Post date:** [15 January 2019 09:44 UTC](https://discourse.nodered.org/t/custom-node-in-docker/6835/1 "2019-01-15T09:44:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rewegit](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rewegit/32/4778_2.png) [@rewegit](https://discourse.nodered.org/u/rewegit)\
**Post date:** [15 January 2019 11:43 UTC](https://discourse.nodered.org/t/custom-node-in-docker/6835/2 "2019-01-15T11:43:03Z")

</div>

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

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

```

The docker run would then look like this:

```auto
$ 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

```

---

<div class="post-metadata">

**Author:** ![Karina25](https://avatars.discourse-cdn.com/v4/letter/k/7ba0ec/32.png) [@Karina25](https://discourse.nodered.org/u/Karina25)\
**Post date:** [15 January 2019 11:44 UTC](https://discourse.nodered.org/t/custom-node-in-docker/6835/3 "2019-01-15T11:44:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rewegit](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rewegit/32/4778_2.png) [@rewegit](https://discourse.nodered.org/u/rewegit)\
**Post date:** [15 January 2019 11:52 UTC](https://discourse.nodered.org/t/custom-node-in-docker/6835/4 "2019-01-15T11:52:24Z")

</div>

Do you use npm link ? like so?  
[examples](https://github.com/node-red/node-red-nodegen)

---

<div class="post-metadata">

**Author:** ![Karina25](https://avatars.discourse-cdn.com/v4/letter/k/7ba0ec/32.png) [@Karina25](https://discourse.nodered.org/u/Karina25)\
**Post date:** [15 January 2019 12:06 UTC](https://discourse.nodered.org/t/custom-node-in-docker/6835/5 "2019-01-15T12:06:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rewegit](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rewegit/32/4778_2.png) [@rewegit](https://discourse.nodered.org/u/rewegit)\
**Post date:** [15 January 2019 12:25 UTC](https://discourse.nodered.org/t/custom-node-in-docker/6835/6 "2019-01-15T12:25:44Z")

</div>

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/](https://properdesign.co.uk/developing-a-new-node-module-in-a-docker-container-without-using-npm-link/)

---

<div class="post-metadata">

**Author:** ![Karina25](https://avatars.discourse-cdn.com/v4/letter/k/7ba0ec/32.png) [@Karina25](https://discourse.nodered.org/u/Karina25)\
**Post date:** [15 January 2019 13:34 UTC](https://discourse.nodered.org/t/custom-node-in-docker/6835/7 "2019-01-15T13:34:19Z")

</div>

Thank you very very much!!

---

<div class="post-metadata">

**Author:** ![rewegit](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rewegit/32/4778_2.png) [@rewegit](https://discourse.nodered.org/u/rewegit)\
**Post date:** [15 January 2019 16:54 UTC](https://discourse.nodered.org/t/custom-node-in-docker/6835/8 "2019-01-15T16:54:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Karina25](https://avatars.discourse-cdn.com/v4/letter/k/7ba0ec/32.png) [@Karina25](https://discourse.nodered.org/u/Karina25)\
**Post date:** [16 January 2019 07:35 UTC](https://discourse.nodered.org/t/custom-node-in-docker/6835/9 "2019-01-16T07:35:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Karina25](https://avatars.discourse-cdn.com/v4/letter/k/7ba0ec/32.png) [@Karina25](https://discourse.nodered.org/u/Karina25)\
**Post date:** [17 January 2019 12:00 UTC](https://discourse.nodered.org/t/custom-node-in-docker/6835/10 "2019-01-17T12:00:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rewegit](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rewegit/32/4778_2.png) [@rewegit](https://discourse.nodered.org/u/rewegit)\
**Post date:** [17 January 2019 13:51 UTC](https://discourse.nodered.org/t/custom-node-in-docker/6835/11 "2019-01-17T13:51:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tomasinouk](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tomasinouk/32/442_2.png) [@tomasinouk](https://discourse.nodered.org/u/tomasinouk)\
**Post date:** [12 June 2019 10:07 UTC](https://discourse.nodered.org/t/custom-node-in-docker/6835/12 "2019-06-12T10:07:32Z")

</div>

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. 🤔

---

<div class="post-metadata">

**Author:** ![felixkosmalla](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/felixkosmalla/32/21971_2.png) [@felixkosmalla](https://discourse.nodered.org/u/felixkosmalla)\
**Post date:** [15 May 2020 08:19 UTC](https://discourse.nodered.org/t/custom-node-in-docker/6835/13 "2020-05-15T08:19:32Z")

</div>

I would be interested 😉

---

<div class="post-metadata">

**Author:** ![mathurv](https://avatars.discourse-cdn.com/v4/letter/m/e9a140/32.png) [@mathurv](https://discourse.nodered.org/u/mathurv)\
**Post date:** [12 August 2021 09:48 UTC](https://discourse.nodered.org/t/custom-node-in-docker/6835/14 "2021-08-12T09:48:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Karina25](https://avatars.discourse-cdn.com/v4/letter/k/7ba0ec/32.png) [@Karina25](https://discourse.nodered.org/u/Karina25)\
**Post date:** [12 August 2021 10:14 UTC](https://discourse.nodered.org/t/custom-node-in-docker/6835/15 "2021-08-12T10:14:53Z")

</div>

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. ☹
