Skip to content

Commit 97173f0

Browse files
author
Dave Conway-Jones
committed
update docker docs and add license page
1 parent 9a140fc commit 97173f0

File tree

2 files changed

+47
-36
lines changed

2 files changed

+47
-36
lines changed

about/license/index.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
layout: about-single
3+
title: License
4+
slug: license
5+
---
6+
7+
### License
8+
9+
Node-RED is licensed under the [Apache 2.0 license](https://www.apache.org/licenses/LICENSE-2.0).
10+
11+
Copyright is retained by the OpenJS Foundation.
12+
13+
**Note**: any extra third party nodes you install may have their own license.

docs/getting-started/docker.md

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -13,39 +13,37 @@ This guide assumes you have some basic familiarity with Docker and the
1313
As of Node-RED 1.0 the repository on [Docker Hub](https://hub.docker.com/r/nodered/node-red/)
1414
was renamed to `nodered/node-red`.
1515

16-
Previous 0.20.x versions are still available at https://hub.docker.com/r/nodered/node-red-docker.
17-
1816
### Quick Start
1917

2018
To run in Docker in its simplest form just run:
2119

22-
docker run -it -p 1880:1880 --name mynodered nodered/node-red
20+
docker run -it -p 1880:1880 -v node_red_data:/data --name mynodered nodered/node-red
2321

2422
Let's dissect that command:
2523

26-
docker run - run this container... initially building locally if necessary
27-
-it - attach a terminal session so we can see what is going on
28-
-p 1880:1880 - connect local port 1880 to the exposed internal port 1880
29-
--name mynodered - give this machine a friendly local name
30-
nodered/node-red - the image to base it on
31-
24+
docker run - run this container, initially building locally if necessary
25+
-it - attach a terminal session so we can see what is going on
26+
-p 1880:1880 - connect local port 1880 to the exposed internal port 1880
27+
-v node_red_data:/data - mount the host node_red_data directory to the container /data directory so any changes made to flows are persisted
28+
--name mynodered - give this machine a friendly local name
29+
nodered/node-red - the image to base it on - currently Node-RED v1.2.0
3230

3331
Running that command should give a terminal window with a running instance of Node-RED.
3432

3533
Welcome to Node-RED
3634
===================
3735

38-
30 Jun 12:57:10 - [info] Node-RED version: v1.1.0
39-
30 Jun 12:57:10 - [info] Node.js version: v10.21.0
40-
30 Jun 12:57:10 - [info] Linux 4.9.184-linuxkit x64 LE
41-
30 Jun 12:57:11 - [info] Loading palette nodes
42-
30 Jun 12:57:16 - [info] Settings file : /data/settings.js
43-
30 Jun 12:57:16 - [info] Context store : 'default' [module=memory]
44-
30 Jun 12:57:16 - [info] User directory : /data
45-
30 Jun 12:57:16 - [warn] Projects disabled : editorTheme.projects.enabled=false
46-
30 Jun 12:57:16 - [info] Flows file : /data/flows.json
47-
30 Jun 12:57:16 - [info] Creating new flow file
48-
30 Jun 12:57:17 - [warn]
36+
10 Oct 12:57:10 - [info] Node-RED version: v1.2.0
37+
10 Oct 12:57:10 - [info] Node.js version: v10.22.1
38+
10 Oct 12:57:10 - [info] Linux 4.19.76-linuxkit x64 LE
39+
10 Oct 12:57:11 - [info] Loading palette nodes
40+
10 Oct 12:57:16 - [info] Settings file : /data/settings.js
41+
10 Oct 12:57:16 - [info] Context store : 'default' [module=memory]
42+
10 Oct 12:57:16 - [info] User directory : /data
43+
10 Oct 12:57:16 - [warn] Projects disabled : editorTheme.projects.enabled=false
44+
10 Oct 12:57:16 - [info] Flows file : /data/flows.json
45+
10 Oct 12:57:16 - [info] Creating new flow file
46+
10 Oct 12:57:17 - [warn]
4947

5048
---------------------------------------------------------------------
5149
Your flow credentials file is encrypted using a system-generated key.
@@ -59,9 +57,9 @@ Running that command should give a terminal window with a running instance of No
5957
file using your chosen key the next time you deploy a change.
6058
---------------------------------------------------------------------
6159

62-
30 Jun 12:57:17 - [info] Starting flows
63-
30 Jun 12:57:17 - [info] Started flows
64-
30 Jun 12:57:17 - [info] Server now running at http://127.0.0.1:1880/
60+
10 Oct 12:57:17 - [info] Starting flows
61+
10 Oct 12:57:17 - [info] Started flows
62+
10 Oct 12:57:17 - [info] Server now running at http://127.0.0.1:1880/
6563

6664
[...]
6765

@@ -93,18 +91,18 @@ Using Alpine Linux reduces the built image size, but removes standard dependenci
9391

9492
See the [Github project README](https://github.com/node-red/node-red-docker/blob/master/README.md) for detailed Image, Tag and Manifest information.
9593

96-
For example: suppose you are running on a Raspberry PI 3B, which has `arm32v7` as architecture. Then just run the following command to pull the image (tagged by `1.1.0-10-arm32v7`), and run the container.
94+
For example: suppose you are running on a Raspberry PI 3B, which has `arm32v7` as architecture. Then just run the following command to pull the image (tagged by `1.2.0-10-arm32v7`), and run the container.
9795
```
98-
docker run -it -p 1880:1880 --name mynodered nodered/node-red:latest
96+
docker run -it -p 1880:1880 -v node_red_data:/data --name mynodered nodered/node-red:latest
9997
```
10098

101-
The same command can be used for running on an amd64 system, since Docker discovers it is running on an amd64 host and pulls the image with the matching tag (`1.1.0-10-amd64`).
99+
The same command can be used for running on an amd64 system, since Docker discovers it is running on an amd64 host and pulls the image with the matching tag (`1.2.0-10-amd64`).
102100

103101
This has the advantage that you don't need to know/specify which architecture you are running on and makes docker run commands and docker compose files more flexible and exchangeable across systems.
104102

105103
**Note**: Currently there is a bug in Docker's architecture detection that fails for `arm32v6` - eg Raspberry Pi Zero or 1. For these devices you currently need to specify the full image tag, for example:
106104
```
107-
docker run -it -p 1880:1880 --name mynodered nodered/node-red:1.1.0-10-arm32v6
105+
docker run -it -p 1880:1880 -v node_red_data:/data --name mynodered nodered/node-red:1.2.0-10-arm32v6
108106
```
109107

110108
### Managing User Data
@@ -286,13 +284,13 @@ docker run --rm -e "NODE_RED_CREDENTIAL_SECRET=your_secret_goes_here" -p 1880:18
286284

287285
### Startup
288286

289-
Environment variables can be passed into the container configure the runtime of Node-RED.
287+
Environment variables can be passed into the container to configure the runtime of Node-RED.
290288

291289
The flows configuration file is set using an environment parameter (**FLOWS**),
292290
which defaults to *'flows.json'*. This can be changed at runtime using the
293291
following command-line flag.
294292
```
295-
docker run -it -p 1880:1880 -e FLOWS=my_flows.json nodered/node-red
293+
docker run -it -p 1880:1880 -v node_red_data:/data -e FLOWS=my_flows.json nodered/node-red
296294
```
297295

298296
**Note**: If you set `-e FLOWS=""` then the flow file can be set via the *flowFile*
@@ -307,15 +305,15 @@ Node.js runtime arguments can be passed to the container using an environment
307305
parameter (**NODE_OPTIONS**). For example, to fix the heap size used by
308306
the Node.js garbage collector you would use the following command.
309307
```
310-
docker run -it -p 1880:1880 -e NODE_OPTIONS="--max_old_space_size=128" nodered/node-red
308+
docker run -it -p 1880:1880 -v node_red_data:/data -e NODE_OPTIONS="--max_old_space_size=128" nodered/node-red
311309
```
312310

313311
### Running headless
314312

315313
To run headless, (i.e. in the background), just replace the `-it` in most previous commands
316314
with `-d`, for example:
317315
```
318-
docker run -d -p 1880:1880 --name mynodered nodered/node-red
316+
docker run -d -p 1880:1880 -v node_red_data:/data --name mynodered nodered/node-red
319317
```
320318

321319
### Container Shell
@@ -367,7 +365,7 @@ For example I have a simple MQTT broker container available as
367365

368366
Then run nodered docker - but this time with a link parameter (name:alias)
369367

370-
docker run -it -p 1880:1880 --name mynodered --link mybroker:broker nodered/node-red
368+
docker run -it -p 1880:1880 -v node_red_data:/data --name mynodered --link mybroker:broker nodered/node-red
371369

372370
the magic here being the `--link` that inserts an entry into the node-red instance
373371
hosts file called *broker* that links to the external mybroker instance.... but we do
@@ -406,7 +404,7 @@ Disadvantages of the native GPIO support are:
406404

407405
To access the host serial port you may need to add the container to the `dialout` group. This can be enabled by adding `--group-add dialout` to the start command. For example
408406
```
409-
docker run -it -p 1880:1880 --group-add dialout --name mynodered nodered/node-red
407+
docker run -it -p 1880:1880 -v node_red_data:/data --group-add dialout --name mynodered nodered/node-red
410408
```
411409

412410
---
@@ -423,7 +421,7 @@ on permissions.
423421
If you are seeing *permission denied* errors opening files or accessing host devices, try running the container as the root user.
424422

425423
```
426-
docker run -it -p 1880:1880 --name mynodered -u node-red:dialout nodered/node-red
424+
docker run -it -p 1880:1880 -v node_red_data:/data --name mynodered -u node-red:dialout nodered/node-red
427425
```
428426

429427
References:
@@ -437,7 +435,7 @@ https://github.com/node-red/node-red-docker/issues/8
437435
If you want to access a device from the host inside the container, e.g. serial port, use the following command-line flag to pass access through.
438436

439437
```
440-
docker run -it -p 1880:1880 --name mynodered --device=/dev/ttyACM0 nodered/node-red
438+
docker run -it -p 1880:1880 -v node_red_data:/data --name mynodered --device=/dev/ttyACM0 nodered/node-red
441439
```
442440
References:
443441
https://github.com/node-red/node-red/issues/15
@@ -446,7 +444,7 @@ https://github.com/node-red/node-red/issues/15
446444

447445
If you want to modify the default timezone, use the TZ environment variable with the [relevant timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
448446
```
449-
docker run -it -p 1880:1880 --name mynodered -e TZ=Europe/London nodered/node-red
447+
docker run -it -p 1880:1880 -v node_red_data:/data --name mynodered -e TZ=Europe/London nodered/node-red
450448
```
451449

452450
References:

0 commit comments

Comments
 (0)