I deployed node-red container aka "IoT edge device module" (nodered/node-red:latest) on an Azure IoT edge device installed on Linux VM on Windows device (EFLOW) based on my experience doing it according to node-red deployment on IoT edge device on Raspberry Pi.
Unfortunately, I face the problem with the following error logs:
Error: EACCES: permission denied, copyfile '/usr/src/node-red/node_modules/node-red/settings.js' -> '/data/settings.js'
at Object.copyFileSync (node:fs:2817:3)
at copyFile (/usr/src/node-red/node_modules/fs-extra/lib/copy/copy-sync.js:73:6)
at onFile (/usr/src/node-red/node_modules/fs-extra/lib/copy/copy-sync.js:59:25)
at getStats (/usr/src/node-red/node_modules/fs-extra/lib/copy/copy-sync.js:51:44)
at handleFilterAndCopy (/usr/src/node-red/node_modules/fs-extra/lib/copy/copy-sync.js:36:10)
at Object.copySync (/usr/src/node-red/node_modules/fs-extra/lib/copy/copy-sync.js:29:10)
at Object.<anonymous> (/usr/src/node-red/node_modules/node-red/red.js:129:20)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32) {
errno: -13,
syscall: 'copyfile',
code: 'EACCES',
path: '/usr/src/node-red/node_modules/node-red/settings.js',
dest: '/data/settings.js'
}
Similar problem I faced during deployment of a node-red on IoT edge device on Raspberry Pi. I solved it with the help of community here. I repeated the same things for the EFLOW (VM on Windows), but it didn't work. Practically, I fixed the "Binds":
"Binds": [
"/home/iotedge-user/node-red:/data"
],
I also described the problem here, though I didn't get any decent help.
Furthermore, as node-red docker is for specific architectures (amd64, arm32v6, arm32v7, arm64v8 and s390x), I also thought I have problems due my system which is:
Virtualization: microsoft
Operating System: CBL-Mariner/Linux
Kernel: Linux 5.15.67.1-4.cm2
Architecture: x86-64
Hardware Vendor: Microsoft Corporation
Hardware Model: Virtual Machine