diff --git a/node-red-container/Dockerfile b/node-red-container/Dockerfile index 984dd17..17d433f 100644 --- a/node-red-container/Dockerfile +++ b/node-red-container/Dockerfile @@ -1,4 +1,4 @@ -FROM nodered/node-red:latest-18 +FROM nodered/node-red:3.1.11-18 ARG REGISTRY ARG REGISTRY_TOKEN @@ -10,19 +10,28 @@ COPY healthcheck.js /healthcheck.js COPY package.json /data WORKDIR /data +RUN mkdir node_modules RUN npm install USER root RUN mkdir -p /usr/local/ssl-certs WORKDIR /usr/src/flowforge-nr-launcher -RUN chown node-red:node-red /data/* /usr/src/flowforge-nr-launcher +RUN chown -R node-red:node-red /usr/src/flowforge-nr-launcher USER node-red RUN npm install @flowfuse/nr-launcher@${BUILD_TAG} +USER root +RUN mkdir -p /data/storage +RUN chmod -R g+w /data/* /data/.npm/* +RUN chown -R node-red:root /data/* /data/.npm/* + +USER node-red + ENV NODE_PATH=/usr/src/node-red +ENV HOME=/usr/src/node-red EXPOSE 2880 -ENTRYPOINT ["./node_modules/.bin/flowfuse-node-red", "-p", "2880", "-n", "/usr/src/node-red"] \ No newline at end of file +ENTRYPOINT ["./node_modules/.bin/flowfuse-node-red", "-p", "2880", "-n", "/usr/src/node-red"]