FROM nodered/node-red:latest WORKDIR /usr/src/node-red # Copy package files and nodes source COPY package.json ./ COPY nodes/ ./nodes/ # Rewrite generalFunctions dependency from git+https to local file path RUN sed -i 's|"generalFunctions": "git+https://[^"]*"|"generalFunctions": "file:./nodes/generalFunctions"|' package.json # Install dependencies (ignore scripts to avoid postinstall git checkout) RUN npm install --ignore-scripts # Copy test flows into Node-RED data directory COPY test/e2e/flows.json /data/flows.json EXPOSE 1880