Skip to content

Commit

Permalink
fix: use Tini for process management in Docker
Browse files Browse the repository at this point in the history
For more information on why this is necessary, check out the following
article: https://www.elastic.io/nodejs-as-pid-1-under-docker-images/

Closes #157
  • Loading branch information
mKeRix committed Apr 13, 2020
1 parent 24cc2c3 commit 932d603
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Expand Up @@ -8,12 +8,12 @@ FROM node:12-alpine

WORKDIR /room-assistant

RUN apk add --no-cache bluez bluez-deprecated libusb avahi-dev bind-tools dmidecode \
RUN apk add --no-cache bluez bluez-deprecated libusb avahi-dev bind-tools dmidecode tini \
&& 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 ["room-assistant"]
ENTRYPOINT ["tini", "--", "room-assistant"]
CMD ["--digResolver"]

0 comments on commit 932d603

Please sign in to comment.