Closed twocolors closed 4 years ago
I think it is already supported. Just pass process.env.PORT value to container.
24 Aug 10:22:37 - [error] Uncaught Exception:
24 Aug 10:22:37 - [error] Error: listen EACCES: permission denied 0.0.0.0:80
at Server.setupListenHandle [as _listen2] (net.js:1296:21)
at listenInCluster (net.js:1361:12)
at doListen (net.js:1498:7)
at processTicksAndRejections (internal/process/task_queues.js:85:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-red-contrib-homekit-docker@1.1.0 start: `node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-red-contrib-homekit-docker@1.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /usr/src/node-red/.npm/_logs/2020-08-24T07_22_37_262Z-debug.log
Starting node-red
> node-red-contrib-homekit-docker@1.1.0 start /usr/src/node-red
> node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data"
cap_net_bind_service=+ep for node ?
The problem here is that the container runs node-red as uid 1000. Only root is allowed to bind to ports <= 1024.
This can be solved by adding a capability to the node binary, which is what @twocolors probably tried to express ;)
setcap 'cap_net_bind_service=+ep' /path/to/node
@Shaquu plz fix this
@twocolors got it, let me see
thx, all work
Support run node red on port 80