# Node-Red-NodeGen: Running Node-Red in docker with (Windows) local files

**URL:** <https://discourse.nodered.org/t/node-red-nodegen-running-node-red-in-docker-with-windows-local-files/24525>\
**Category:** General\
**Created:** [9 April 2020 14:12 UTC](https://discourse.nodered.org/t/node-red-nodegen-running-node-red-in-docker-with-windows-local-files/24525 "2020-04-09T14:12:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AiKju](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aikju/32/20215_2.png) [@AiKju](https://discourse.nodered.org/u/AiKju)\
**Post date:** [9 April 2020 14:12 UTC](https://discourse.nodered.org/t/node-red-nodegen-running-node-red-in-docker-with-windows-local-files/24525/1 "2020-04-09T14:12:11Z")

</div>

Hi I am running Node-Red from docker (on Linux):

docker run -d -p 1880:1880 --name flow-machine --link msg-broker:msg-pipe -e FLOWS=flow-machine.json -v C:/Projekte/Lokal/software/develop/GitHub/NodeRed2Python/.node-red:/data nodered/node-red-docker

That means that my data is hosted locally on Windows C:....node-red\lib\flows  
And now I want to automate the generation of node-red-nodegen. I can start node-red-nodegen by calling:

docker exec flow-machine node\_modules/node-red-nodegen/bin/node-red-nodegen.js

Adding the library (from node-red-nodegen-example II) docker exec flow-machine node\_modules/node-red-nodegen/bin/node-red-nodegen.js C:/Projekte/Lokal/software/develop/GitHub/NodeRed2Python/.node-red/lib/flows/tolowercase2.js

results into an error!

Error: ENOENT: no such file or directory, open 'C:/Projekte/Lokal/software/develop/GitHub/NodeRed2Python/.node-red/lib/flows/lower-case.js'  
at Object.fs.openSync (fs.js:646:18)  
at Object.fs.readFileSync (fs.js:551:33)  
at Object. (/usr/src/node-red/node\_modules/node-red-nodegen/bin/node-red-nodegen.js:161:27)  
at Module.\_compile (module.js:653:30)  
at Object.Module.\_extensions..js (module.js:664:10)  
at Module.load (module.js:566:32)  
at tryModuleLoad (module.js:506:12)  
at Function.Module.\_load (module.js:498:3)  
at Function.Module.runMain (module.js:694:10)  
at startup (bootstrap\_node.js:204:16)

Can anybody help me with this problem? Thanks in advance.

---

<div class="post-metadata">

**Author:** ![michaelblight](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/michaelblight/32/445_2.png) [@michaelblight](https://discourse.nodered.org/u/michaelblight)\
**Post date:** [11 April 2020 02:48 UTC](https://discourse.nodered.org/t/node-red-nodegen-running-node-red-in-docker-with-windows-local-files/24525/2 "2020-04-11T02:48:31Z")

</div>

I'm confused - if you're running NR under docker on a Linux box, how is it able to refer to C: directly on your Windows box? I would have expected this to be a network share that you've mounted on Linux.

---

<div class="post-metadata">

**Author:** ![AiKju](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/aikju/32/20215_2.png) [@AiKju](https://discourse.nodered.org/u/AiKju)\
**Post date:** [11 April 2020 09:54 UTC](https://discourse.nodered.org/t/node-red-nodegen-running-node-red-in-docker-with-windows-local-files/24525/3 "2020-04-11T09:54:03Z")

</div>

Hi Michael,

sorry I was imprecise. I meant Docker and Windows10. I just mentioned Linux because I assumed that my Docker container is running Linux. And I don't know much about Linux.

So I want to start a Windows Batch process that starts Docker scripts/apps (Node-Red-NodeGen) but holds all data (nodes/flows) locally in Windows. Particular I am trying to run the Node-Red-NodeGen example (Example 2. Create an original node from function node (JavaScript code) with MYWINDOWS.node-red/lib/functions/lower-case.js)

Hope this is better to understand...

---

<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:** [10 June 2020 09:54 UTC](https://discourse.nodered.org/t/node-red-nodegen-running-node-red-in-docker-with-windows-local-files/24525/4 "2020-06-10T09:54:04Z")

</div>

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