Skip to content

Commit ded39be

Browse files
author
Dave Conway-Jones
committed
clarify docker docs re data dir at build time
add node12 as recommended (as well as 10)
1 parent d917c93 commit ded39be

2 files changed

Lines changed: 16 additions & 8 deletions

File tree

docs/faq/node-versions.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: Supported Node versions
55
slug: node versions
66
---
77

8-
Node-RED currently recommends **Node 10.x LTS**.
8+
Node-RED currently recommends **Node 10.x LTS** or **Node 12.x LTS**.
99

1010
Version | Support Level | Notes
1111
--------|---------------|------
@@ -14,7 +14,9 @@ Version | Support Level | Notes
1414
9.x | *Unsupported* |
1515
**10.x** | **Recommended** |
1616
11.x | *Unsupported* |
17-
**12.x** | **Supported** |
17+
**12.x** | **Recommended** |
18+
13.x | *Unsupported* |
19+
**14.x** | **Supported** |
1820

1921

2022
We try to stay up to date with Node.js releases. Our goal is to support

docs/getting-started/docker.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -221,29 +221,35 @@ It can sometimes be useful to populate a Node-RED Docker image with files from a
221221
```
222222
Dockerfile
223223
README.md
224+
package.json # add any extra nodes your flow needs into your own package.json.
224225
flows.json # the normal place Node-RED store your flows
225226
flows_cred.json # credemtials your flows may need
226-
package.json # the non-standard modules your flows use
227-
settings.js # the normal settings file
227+
settings.js # your settings file
228228
```
229229

230+
**NOTE**: This method is NOT suitable if you want to mount the /data volume externally. If you need to use an external volume for persistence then copy your settings and flows files to that volume instead.
231+
230232
The following Dockerfile builds on the base Node-RED Docker image, but additionally moves your own files into place into that image:
231233

232234
```
233235
FROM nodered/node-red
234236
235237
# Copy package.json to the WORKDIR so npm builds all
236-
# of your added modules for Node-RED
238+
# of your added nodes modules for Node-RED
237239
COPY package.json .
238-
RUN npm install --only=production
240+
RUN npm install --unsafe-perm --no-update-notifier --no-fund --only=production
239241
240242
# Copy _your_ Node-RED project files into place
243+
# NOTE: This will only work if you DO NOT later mount /data as an external volume.
244+
# If you need to use an external volume for persistence then
245+
# copy your settings and flows files to that volume instead.
241246
COPY settings.js /data/settings.js
242247
COPY flows_cred.json /data/flows_cred.json
243248
COPY flows.json /data/flows.json
244249
245-
# Start the container normally
246-
CMD ["npm", "start"]
250+
# You should add extra nodes via your package.json file but you can also add them here:
251+
#WORKDIR /usr/src/node-red
252+
#RUN npm install node-red-node-smooth
247253
```
248254

249255
#### Dockerfile order and build speed

0 commit comments

Comments
 (0)