2017-08-28 20:30:50 +00:00
|
|
|
FROM hypriot/rpi-node:8
|
2016-11-14 22:41:21 +00:00
|
|
|
MAINTAINER ViViDboarder <vividboarder@gmail.com>
|
|
|
|
|
2017-08-29 04:32:42 +00:00
|
|
|
RUN cross-build-start || true
|
2017-07-04 23:42:23 +00:00
|
|
|
|
2016-11-14 22:41:21 +00:00
|
|
|
ENV LANG en_US.UTF-8
|
|
|
|
ENV LC_ALL en_US.UTF-8
|
|
|
|
|
2017-07-04 23:42:23 +00:00
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y --no-install-recommends \
|
2016-11-14 22:41:21 +00:00
|
|
|
avahi-daemon \
|
|
|
|
avahi-discover \
|
2016-11-15 01:01:34 +00:00
|
|
|
build-essential \
|
2017-10-26 15:41:23 +00:00
|
|
|
iputils-ping \
|
2016-11-15 01:01:34 +00:00
|
|
|
libavahi-compat-libdnssd-dev \
|
|
|
|
libnss-mdns && \
|
|
|
|
apt-get clean && \
|
|
|
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
2016-11-14 22:41:21 +00:00
|
|
|
|
2016-11-15 01:01:34 +00:00
|
|
|
RUN mkdir -p /var/run/dbus/
|
|
|
|
|
2017-08-29 01:35:05 +00:00
|
|
|
# Can't run as non-root yet because avahi needs to be started by root
|
|
|
|
# RUN useradd -ms /bin/bash -d /homebridge homebridge
|
|
|
|
# USER homebridge
|
|
|
|
|
|
|
|
RUN mkdir -p /$HOME/.homebridge
|
|
|
|
VOLUME /$HOME/.homebridge
|
|
|
|
|
|
|
|
WORKDIR /homebridge
|
|
|
|
|
|
|
|
COPY package.json /homebridge/
|
|
|
|
COPY npm-shrinkwrap.json /homebridge/
|
|
|
|
RUN [ -s npm-shrinkwrap.json ] || rm npm-shrinkwrap.json
|
|
|
|
|
|
|
|
RUN npm install
|
2017-07-04 23:42:23 +00:00
|
|
|
|
2017-08-29 04:32:42 +00:00
|
|
|
RUN cross-build-end || true
|
2017-07-04 23:42:23 +00:00
|
|
|
|
|
|
|
EXPOSE 5353 51826
|
2016-11-14 22:41:21 +00:00
|
|
|
|
2017-08-29 01:35:05 +00:00
|
|
|
COPY start.sh /homebridge/
|
|
|
|
|
|
|
|
COPY plugins-sample.txt /homebridge/plugins.txt
|
2016-11-14 22:41:21 +00:00
|
|
|
|
2017-08-29 01:35:05 +00:00
|
|
|
CMD /homebridge/start.sh
|