Update Dockerfile
Browse files- Dockerfile +4 -1
Dockerfile
CHANGED
|
@@ -2,6 +2,9 @@
|
|
| 2 |
FROM node:latest
|
| 3 |
|
| 4 |
# 清理缓存
|
|
|
|
|
|
|
|
|
|
| 5 |
RUN npm cache clean --force
|
| 6 |
|
| 7 |
# 安装 Node-RED
|
|
@@ -14,7 +17,7 @@ COPY settings.js /usr/src/node-red/settings.js
|
|
| 14 |
COPY flows.json /usr/src/node-red/flows.json
|
| 15 |
|
| 16 |
# 安装节点
|
| 17 |
-
RUN npm install -g node-red-node-email
|
| 18 |
|
| 19 |
# 启动 Node-RED
|
| 20 |
CMD ["node-red", "--userDir", "/usr/src/node-red"]
|
|
|
|
| 2 |
FROM node:latest
|
| 3 |
|
| 4 |
# 清理缓存
|
| 5 |
+
USER root
|
| 6 |
+
RUN apt-get update && \
|
| 7 |
+
apt-get install -y iputils-ping && \
|
| 8 |
RUN npm cache clean --force
|
| 9 |
|
| 10 |
# 安装 Node-RED
|
|
|
|
| 17 |
COPY flows.json /usr/src/node-red/flows.json
|
| 18 |
|
| 19 |
# 安装节点
|
| 20 |
+
RUN npm install -g node-red-node-email node-red-node-ping
|
| 21 |
|
| 22 |
# 启动 Node-RED
|
| 23 |
CMD ["node-red", "--userDir", "/usr/src/node-red"]
|