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

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.

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.

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

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