forked from bunker-stills/bunkerbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.template
28 lines (18 loc) · 1.08 KB
/
Dockerfile.template
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
# NOTE: This is for running this app on resin.io with the older Raspberry Pi CPU
FROM resin/raspberry-pi-node:6.10.2-slim
RUN apt-get update && apt-get install -y libusb-1.0-0 uuid-runtime wget pm-utils owserver && apt-get clean && rm -rf /var/lib/apt/lists/*
RUN wget http://download.tinkerforge.com/tools/brickd/linux/brickd-2.2.3_armhf.deb && dpkg -i brickd-2.2.3_armhf.deb && rm brickd-2.2.3_armhf.deb
WORKDIR /usr/src/app
COPY package.json package.json
RUN JOBS=MAX npm install --production --unsafe-perm && npm install owjs --production --unsafe-perm && npm cache clean && rm -rf /tmp/*
COPY . ./
# Copy OWFS configuration
COPY ./resin.io/setup/owfs.conf /etc/owfs.conf
# Create a random password for tinkerforge
RUN echo "authentication.secret = $(uuidgen)" > /etc/brickd.conf && apt-get remove -y uuid-runtime
ENV NODE_PATH /usr/src/app
ENV INITSYSTEM on
#CMD ["node", "/usr/src/app/resin.io/server.js"]
COPY ./resin.io/bunkerbox.service /etc/systemd/system/z99bunkerbox.service
RUN systemctl enable /etc/systemd/system/z99bunkerbox.service
# View logs with > journalctl -f -u z99bunkerbox