Skip to content

Commit 7ceec9d

Browse files
authored
Update docker.md (#325)
Add comment about Debian build and fix example of installing nodes
1 parent e981076 commit 7ceec9d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/getting-started/docker.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ This has the advantage that you don't need to know/specify which architecture yo
105105
docker run -it -p 1880:1880 -v node_red_data:/data --name mynodered nodered/node-red:1.2.0-10-arm32v6
106106
```
107107

108+
As of Node-RED v3.1.0 we also provide a Debian based image for those nodes with native components that do not work well on Alpine.
109+
108110
### Managing User Data
109111

110112
Once you have Node-RED running with Docker, we need to
@@ -234,8 +236,10 @@ FROM nodered/node-red
234236
235237
# Copy package.json to the WORKDIR so npm builds all
236238
# of your added nodes modules for Node-RED
237-
COPY package.json .
239+
WORKDIR /data
240+
COPY package.json /data
238241
RUN npm install --unsafe-perm --no-update-notifier --no-fund --only=production
242+
WORKDIR /usr/src/node-red
239243
240244
# Copy _your_ Node-RED project files into place
241245
# NOTE: This will only work if you DO NOT later mount /data as an external volume.
@@ -244,10 +248,6 @@ RUN npm install --unsafe-perm --no-update-notifier --no-fund --only=production
244248
COPY settings.js /data/settings.js
245249
COPY flows_cred.json /data/flows_cred.json
246250
COPY flows.json /data/flows.json
247-
248-
# You should add extra nodes via your package.json file but you can also add them here:
249-
#WORKDIR /usr/src/node-red
250-
#RUN npm install node-red-node-smooth
251251
```
252252

253253
**Note**: the `package.json` file must contain a start option within the script section. For example the default container is like this:

0 commit comments

Comments
 (0)