From 7ceec9d53fa4be3170a271082446e84cf81068d2 Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Thu, 18 Jan 2024 12:10:56 +0000 Subject: [PATCH] Update docker.md (#325) Add comment about Debian build and fix example of installing nodes --- docs/getting-started/docker.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/getting-started/docker.md b/docs/getting-started/docker.md index 67abebca..bf751c19 100644 --- a/docs/getting-started/docker.md +++ b/docs/getting-started/docker.md @@ -105,6 +105,8 @@ This has the advantage that you don't need to know/specify which architecture yo docker run -it -p 1880:1880 -v node_red_data:/data --name mynodered nodered/node-red:1.2.0-10-arm32v6 ``` +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. + ### Managing User Data Once you have Node-RED running with Docker, we need to @@ -234,8 +236,10 @@ FROM nodered/node-red # Copy package.json to the WORKDIR so npm builds all # of your added nodes modules for Node-RED -COPY package.json . +WORKDIR /data +COPY package.json /data RUN npm install --unsafe-perm --no-update-notifier --no-fund --only=production +WORKDIR /usr/src/node-red # Copy _your_ Node-RED project files into place # 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 COPY settings.js /data/settings.js COPY flows_cred.json /data/flows_cred.json COPY flows.json /data/flows.json - -# You should add extra nodes via your package.json file but you can also add them here: -#WORKDIR /usr/src/node-red -#RUN npm install node-red-node-smooth ``` **Note**: the `package.json` file must contain a start option within the script section. For example the default container is like this: