forked from shantanoo-desai/node-red-slim
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (18 loc) · 730 Bytes
/
Dockerfile
File metadata and controls
28 lines (18 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM alpine:3.18 AS base
LABEL AUTHOR="Corey Thompson <corey.dwayne.thompson@gmail.com>"
RUN apk add --no-cache \
nodejs \
npm && \
mkdir -p /usr/src/node-red /data && \
adduser -h /usr/src/node-red -D -H node-red -u 1000 && \
chown -R node-red:node-red /data
FROM nodered/node-red:3.1.0-18-minimal AS build
COPY package.json .
RUN npm install --unsafe-perm --no-update-notifier --no-audit --only=production
FROM base as prod
COPY --from=build --chown=node-red:node-red /data/ /data/
WORKDIR /usr/src/node-red
COPY settings.js /data/settings.js
COPY flows.json /data/flows.json
COPY --from=build --chown=node-red:node-red /usr/src/node-red/ /usr/src/node-red/
CMD ["npm", "start"]