Node-Red "exec" Node in Docker

Help.

I have my Raspberry Pi set up with Node-Red, Grafana, Mosequetto and InfluxDB, each in a Docker Container.

I want to use the Node-Red "exec" node to send a "vcgencmd measure_temp" to the Raspberry Pi to trend the CPU temperature. It appears I need to do something additional to allow the command from Node-Red to exit the Node-Red container? Can someone suggest what I need to do?

The command works fine when I send it using the terminal console. I get an "error #127" when sending it from Node-Red "exec" node.

Also, on another Pi, without using Docker Containers, the Node-Red "exec" flow works fine.

Alan

I'm no expert on Docker but one of its key concepts I believe is to isolate the app from the machine its running on (and vice versa)

Which is great for playing around with or using MQTT but not for interacting with the hardware of the machine its running on

Unless you've got a important reason, I'd install Node-RED natively using the standard install script

Thanks cymplecy.

I moved Node-Red outside the container and all is good now.

No reason to have used a container, for Node-Red, in the first place.....it was just an easy way to configure the many application installs when I built the Raspberry.

Alan

1 Like