forked from mKeRix/room-assistant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dev.Dockerfile
22 lines (17 loc) · 1.03 KB
/
dev.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM node:16-alpine3.12 as build
WORKDIR /room-assistant
RUN apk add --no-cache python3 make g++ libusb-dev eudev-dev avahi-dev cairo-dev jpeg-dev pango-dev giflib-dev
COPY ./*.tgz /room-assistant/
RUN npm install -g --unsafe-perm *.tgz
FROM node:16-alpine3.12
WORKDIR /room-assistant
RUN apk add --no-cache bluez bluez-deprecated libusb avahi-dev bind-tools dmidecode tini curl tzdata cairo-dev jpeg-dev pango-dev giflib-dev \
&& setcap cap_net_raw+eip $(eval readlink -f `which node`) \
&& setcap cap_net_raw+eip $(eval readlink -f `which hcitool`) \
&& setcap cap_net_admin+eip $(eval readlink -f `which hciconfig`) \
&& ln -s /usr/local/lib/node_modules/room-assistant/bin/room-assistant.js /usr/local/bin/room-assistant
RUN npm install -g winston-loki winston-elasticsearch
COPY --from=build /usr/local/lib/node_modules/room-assistant /usr/local/lib/node_modules/room-assistant
ENTRYPOINT ["tini", "--", "room-assistant"]
CMD ["--digResolver"]
HEALTHCHECK --start-period=15s CMD curl --fail http://localhost:6415/status/ || exit 1