forked from mKeRix/room-assistant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
20 lines (15 loc) · 920 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM node:12-alpine as build
ARG ROOM_ASSISTANT_VERSION=latest
RUN apk add --no-cache python make g++ libusb-dev eudev-dev avahi-dev
RUN npm install -g --unsafe-perm room-assistant@$ROOM_ASSISTANT_VERSION
FROM node:12-alpine
WORKDIR /room-assistant
RUN apk add --no-cache bluez bluez-deprecated libusb avahi-dev bind-tools dmidecode tini curl \
&& 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
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