Created
April 4, 2023 23:47
-
-
Save WillSams/5d07f90a17ade3772978bb35a6c104d3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARG ARCH="" | |
FROM ${ARCH}node:16.20.0-alpine3.17 | |
# Install Node.js and Node-RED | |
RUN apk add --no-cache \ | |
python3 && \ | |
apk add --no-cache --virtual .build-deps \ | |
build-base gcc abuild binutils binutils-doc gcc-doc \ | |
&& npm install -g npm \ | |
&& apk del .build-deps | |
RUN if [ "$ARCH" = "${ARCH#*arm64}" ]; then \ | |
export PATH="/opt/nodejs/bin:$PATH" && \ | |
npm install --global --unsafe-perm node-red@3.0.2; \ | |
else \ | |
npm install --global --unsafe-perm node-red@3.0.2; \ | |
fi | |
# todo: lock these down to the versions our devs have tested | |
RUN npm i -g @anl-ioc/node-red-contrib-oadr-ven@1.1.0 \ | |
node-red-contrib-aws-iot-custom-auth@0.2.0 \ | |
node-red-contrib-chronos@1.18.4 \ | |
node-red-contrib-countdown@1.3.2 \ | |
node-red-contrib-cron-plus@1.5.7 \ | |
node-red-contrib-graphql@2.1.0 \ | |
node-red-contrib-graphql-server@0.2.1 \ | |
node-red-contrib-influxdb@0.6.1 \ | |
node-red-contrib-loop@1.0.1 \ | |
node-red-contrib-modbus@5.25.0 \ | |
node-red-contrib-moment@4.0.0 \ | |
node-red-contrib-mongodb-aleph@0.3.0 \ | |
node-red-contrib-mongodb4@1.10.0 \ | |
node-red-contrib-os@^0.2.1 \ | |
node-red-contrib-s3@0.1.2 \ | |
node-red-contrib-s7@3.1.0 \ | |
node-red-contrib-stackhero-influxdb-v2@1.0.4 \ | |
node-red-contrib-timer@1.0.4 \ | |
node-red-contrib-timerswitch@1.4.0 \ | |
node-red-contrib-zip@1.1.0 \ | |
node-red-dashboard@3.3.1 \ | |
node-red-node-aws@0.2.3 | |
# Set the working directory to Node-RED's user data directory | |
WORKDIR /data | |
# Expose port 1880 for Node-RED | |
EXPOSE 1880 | |
# We can use our own settings.js and flows.json | |
COPY settings.js /data/settings.js | |
COPY flows.json /data/flows.json | |
COPY certs /data/iot/certs | |
# Start Node-RED | |
CMD ["node-red"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment