Docker Exec node & automatic update?

Hello,

When NR is running in a container, it is no longer possible to launch the node EXEC
to run the command by exemple "sudo systemctl restart nodered" or "node-red-restart" as it is possible with a standard installation without Docker.
How can I do this kind function ?

Generally speaking, we need to interact with the host.
For example, to retrieve the host IP and especially to be able to launch a script that will,
for example, update automatically the docker images (as described in the doc below)

How do you or would you do that ?

Generally I use something like watchtower outside of Node-RED to update all my containers. GitHub - containrrr/watchtower: A process for automating Docker container base image updates.

Wow, this tool impresses me.
It even goes so far as to notify us by email that the update has taken place.
I've read through the doc, a lot of possibilities.
I'm obviously going to test it. thank you for this information.

Otherwise, for the communication between a container and the host,

  • I tried the named pipe, but it crashes from time to time, for me not too reliable.
  • Put a file in a directory that is regularly scanned by the other party
  • A web hook, not yet tested
  • Any other ?

This may be of interest to some.
To restart NR dockerized, you just have to pass the reboot command from an exec node. It will restart the container. As simple as that.

See here for original information

It seems that you can also reboot linux by mounting /proc/sysrq-trigger on a volume.
Once done, you have to run the command echo b > /sysrq
from inside the container.
Tried positively with a centos container but there is still a problem of rights with NR.
It should be possible to fix it.
It runs (reboot) with root user
image

See here for original information

A consideration comes to me.
With this tool, I was wondering, is it possible to condition the update of the various containers to the validation of my container on my private hub?

I use grafana+mosquitto+influxdb container, but they should update when I have updated my custom NR image and could test, validate the new versions of other containers.

I didn't see this option, basically a flag that gives the green light for updates of the whole containers.

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