-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
60 lines (44 loc) · 1.66 KB
/
Dockerfile
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#-------------------------------------------------------------------------------
# Copyright (C) 2018 Atos and others
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
# which accompanies this distribution, and is available at
# https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Atos - initial API and implementation
#-------------------------------------------------------------------------------
#ARG BASEIMAGE_BUILD=resin/raspberry-pi3-node:7.8.0-20170426
#ARG BASEIMAGE_BUILD=resin/intel-nuc-node:7.8.0-20170506
#ARG BASEIMAGE_DEPLOY=resin/raspberry-pi3-node:7.8.0-slim-20170426
#ARG BASEIMAGE_DEPLOY=resin/intel-nuc-node:7.8.0-slim-20170506
ARG BASEIMAGE_BUILD
ARG BASEIMAGE_DEPLOY
FROM $BASEIMAGE_DEPLOY
RUN apt-get update
#
# Only for rpi: vcgencmd support
# https://forums.resin.io/t/cant-run-vcgencmd/39
#
RUN apt-get install -y libraspberrypi-bin || echo "libraspberrypi-bin not available"
RUN apt-get install -y lm-sensors || echo "lm-sensors not available"
RUN apt-get install sysstat
RUN npm install -g node-red
WORKDIR /opt/lib
ARG TESSERACT=node-red-contrib-tesseract
ARG DEPLOYER=node-red-contrib-agile-deployer
COPY $TESSERACT $TESSERACT
COPY $DEPLOYER $DEPLOYER
WORKDIR /usr/local/lib/node_modules/node-red/node_modules
RUN npm install /opt/lib/$TESSERACT
RUN npm install /opt/lib/$DEPLOYER
RUN npm install node-red-contrib-cpu
#FROM $BASEIMAGE_DEPLOY
#COPY --from=0 /opt/secure-nodered /opt/secure-nodered
#WORKDIR /opt/secure-nodered
WORKDIR /opt/offload
COPY docker/start.sh start.sh
EXPOSE 1880
CMD /opt/offload/start.sh