-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (26 loc) · 892 Bytes
/
Dockerfile
File metadata and controls
38 lines (26 loc) · 892 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
29
30
31
32
33
34
35
36
37
38
#FROM arm32v7/node:8
FROM raspbian/stretch
MAINTAINER sencom1028@gmail.com
#&& chown -R node:node /home/node/app
#explicit set work dir
RUN mkdir -p /home/node/app/node_modules
WORKDIR /home/node/app
#copy package.json && package-lock.json
COPY package*.json ./
#switch user to node
USER root
RUN apt-get update -y && apt-get upgrade -y && apt-get install -y
RUN apt-get install curl -y && curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
RUN apt-get install nodejs -y && apt-get install build-essential -y
#install package, lib when boot start
ADD ./sh-scripts/boot-st.sh /boot-st.sh
RUN chmod +x /boot-st.sh
RUN /boot-st.sh
COPY . .
EXPOSE 3000
#mariadb healthcheck
ADD ./sh-scripts/healthcheck.sh /healthcheck.sh
RUN chmod +x /healthcheck.sh
RUN chmod +x ./sh-scripts/bluetooth-conn.sh
RUN chmod +x ./sh-scripts/bluetooth-scan.sh
CMD /healthcheck.sh && npm start