Anyone using Docker?

#1

Hi,

Lately my eye fell on docker. Which looks a very interesting technology to me. There are also Node-RED docker images.

So I was wondering if there is anyone out there using docker (e.g. on raspberry pi) ?
I am especially interested in any interesting use cases based on docker.

Jan.

0 Likes

#2

Hi Jan,

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.

If you have any question, feel free to ask.

Regards,
Marin

1 Like

#3

I’m using it via my QNAP NAS (and it’s Container Station facility).

For me it works well, being a container it was easy to set up and run, requiring no additional hardware, just a small allocation of the host’s resources.

1 Like

#4

Hi Marin,

Thanks for your response.

I am bit wondering how this works. I would expect that images for the raspberry pi won't run on your laptop as it is a different hardware architecture (e.g. intel processor versus ARM processor).

So I guess this means that flows are stored in the persistent volume, but does this also mean that the newly installed nodes including Node.js modules are installed in the persistent volume ?

0 Likes

#5

Hi Jan,

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.

Marin.

0 Likes

#6

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.

1 Like

#7

Hi,
I have a couple of QNAP NAS boxes that I use as my home servers.
I'm interested in putting Node-RED via Docker on one of the boxes.
Is it difficult?
Where did you find the instructions?

Kind regards from David.

0 Likes

#8

Hi @dynamicdave

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.

0 Likes

#9

Hiss boo - 'Container Station' is not available on either of my QNAP boxes.

0 Likes

#10

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)

Craig

1 Like

#11

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.

1 Like

#12

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.

1 Like

#13

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.

See the sransards here and documenttion below.

1 Like

#14

I used a pool of nodered docker container for a workshop some time ago.

Very usefull to create NR instances for the students on my laptop, without waste time installing stand alone ones.

0 Likes

#15

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.

1 Like