I have been using Node-Red in docker for about 2 months now. I am running all my stuff in docker containers on a Raspberry Pi 3 using the Hypriot OS. I find it useful to run in docker mainly because i have another VM, which is set up on my laptop and i can easily switch over to it with minimum downtime of services (e.g. Homeautomation), being able to run the same stuff as on the RPi. I use persistent volumes for node-red data, so that when i install new modules, as well as if i rebuild the container the data is always there.
I can use the Exec node as well, even though Node-Red is in a docker container.
About the images, yes they are different architecture, but data is more or less the same (speaking for NR specifically). And yes if you install modules they persist as well, but i usually install module through the palette manager and if required, i enter the container and install using npm manually.
I'm using Node-Red in Docker on a Pi and also on Ubuntu->VirtualBox->Windows. It is brilliant. I can easily spin up multiple containers that map different external ports to 1880 so the Node Red config is identical. Very handy for different projects or testing.
If you go down the Docker path, you should also look at Portainer (which also runs under Docker) to manage/monitor your Docker containers. If nothing else, it simplifies using SSH to connect.
If you have Container Station installed; it was pretty straight forward for me (but I’m no expert)
I just choose to create a container searched for ‘node red’ adjusted the resource allocation from the host and made it ‘bridge’ so it had it’s own IP address, and that was it.
Yep been using Docker for ages now. I use it for a heap of different services, but also have started experimenting with Node-red in there (within a Virtual machine) - i run all of this under ESXi rather than Raspberry Pis
ONce you get used to docker and how it works it will change the way you work - best thing is the ability to grab something for testing from the internet and have it spun up and in testing within about 3 minutes. Also knowing you can blow it away very quickly and leave your system in pristine condition again.
The combination of Virtual machines and containers is out of this world (and i do use Portainer also)
I wrote one of the very early docker templates for NodeRed and have been using NR in a docker for ages.
Docker works really well - I use it on windows, macs and linux systems. Set external volumes for persistant data and you can update at will. Docker also allows you to run multiple copies easilty (different ports) - ideal for testing.
At home, I use unRaid operating system (unraid.net) which supports docker (I have 17 dockers running inc NodeRed, Home Assistant, MQTT, Plex etc) and VMs running on legacy hardware.
I'm using docker on an x86 box but I don't have my main node-red running there. I have the second node-red instance running in a docker container. It's using a different port so it doesn't conflict. It's for my dev code (the mytimeout node). I also have another container for gerbera (media server) which my current Debian distribution doesn't support. It would be a huge pain to d/l, upgrade and/or compile all necessary libraries.
I have been using Docker for both my home automation, and for reporting water usage as for industrial businesses, on a stack of RPis, using NR, MQTT, MariaDB in the containers, for more than a yr now. I have documented the approach, all though some aspects needs a refresh now. I am waiting for release 0.20 where the runtime will be split off, this will be a major step forward.
I do. It makes upgrades nice and I know where all my data is. I also run an nginx instance in docker on the machine to proxy the instance. This gives me (a) an easier to manage SSL/TLS setup, (b) ability to fine tune auth per endpoint and safely expose certain endpoints to the internet without exposing the rest of node-red or dashboard, (c) the ability to proxy OTHER things on the same site that aren't hosted in node-red but I need to expose to the network as well.
Docker really makes any setup much easier for me, and satisfies my need for easy backups / config and a nice clean base OS installation.
Hi there, am new to Docker but understand the concepts. Have run HA and Node Red ona Pi for a while te, but am now trying to move to Docker for a permanent home for it all. I have both HA and NR setup on my Docker setup (Ubuntu on NUC). How do I get NR to talk to HA ?
Show us your docker build files so we can see what you have done
typically for a newbie i would suggest against running NR in a docker container until you are across it pretty well.
I would definitely recommend against using someone elses Docker container (rather than one you build yourself) as there are a reasonably constant stream of updates between NR, Dashboard, NPM, NodeJS and the like
@Memphisdj, You say you use the Exec node successfully with your docker installation of NR.
I have run into several issues with the Exec node because the user node-red has very little access rights inside the container.
Do you know of any way to permanently or temporarily grant elevated rights to the node-red user?
At least in my NR container, I do not have either sudo or apt-get so there's very little I can do.
The user has rights inside the container, it is outside the container that is the problem. A major purpose of using a Docker install is to limit the rights that the app has over the rest of the system. If you don't want that then perhaps you would be better not using docker.