mirror of
https://github.com/ViViDboarder/docker-rpi-homebridge.git
synced 2024-12-30 17:37:37 +00:00
Initial code commit
Image builds and container runs. Running into an issue with node and needs documentation.
This commit is contained in:
parent
af38ad359f
commit
9649305adf
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
config.json
|
||||
plugins.txt
|
||||
tags
|
32
Dockerfile
Normal file
32
Dockerfile
Normal file
@ -0,0 +1,32 @@
|
||||
FROM hypriot/rpi-node:7
|
||||
# FROM hypriot/rpi-node:6.9.1
|
||||
MAINTAINER ViViDboarder <vividboarder@gmail.com>
|
||||
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
avahi-daemon \
|
||||
avahi-discover \
|
||||
libnss-mdns \
|
||||
libavahi-compat-libdnssd-dev
|
||||
|
||||
RUN npm install -g --unsafe-perm \
|
||||
homebridge \
|
||||
hap-nodejs \
|
||||
node-gyp && \
|
||||
cd /usr/local/lib/node_modules/homebridge/ && \
|
||||
npm install --unsafe-perm bignum && \
|
||||
cd /usr/local/lib/node_modules/hap-nodejs/node_modules/mdns && \
|
||||
node-gyp BUILDTYPE=Release rebuild
|
||||
|
||||
USER root
|
||||
RUN mkdir -p /root/.homebridge
|
||||
VOLUME /root/.homebridge
|
||||
WORKDIR /root/.homebridge
|
||||
|
||||
EXPOSE 5353 51826
|
||||
|
||||
CMD cat /root/.homebridge/plugins.txt | xargs npm install -g --unsafe-perm && homebridge
|
14
Makefile
Normal file
14
Makefile
Normal file
@ -0,0 +1,14 @@
|
||||
build:
|
||||
docker build -t rpi-homebridge .
|
||||
|
||||
run: build
|
||||
docker run --net=host --rm \
|
||||
-v "$(shell pwd)/config.json:/root/.homebridge/config.json" \
|
||||
-v "$(shell pwd)/plugins.txt:/root/.homebridge/plugins.txt" \
|
||||
rpi-homebridge
|
||||
|
||||
shell: build
|
||||
docker run --net=host --rm \
|
||||
-v "$(shell pwd)/config.json:/root/.homebridge/config.json" \
|
||||
-v "$(shell pwd)/plugins.txt:/root/.homebridge/plugins.txt" \
|
||||
-it rpi-homebridge bash
|
24
config-sample.json
Normal file
24
config-sample.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"bridge": {
|
||||
"name": "Homebridge",
|
||||
"username": "CC:22:3D:E3:CE:30",
|
||||
"port": 51826,
|
||||
"pin": "031-45-154"
|
||||
},
|
||||
|
||||
"description": "This is an example configuration file with one fake accessory and one fake platform. You can use this as a template for creating your own configuration file containing devices you actually own.",
|
||||
|
||||
"accessories": [
|
||||
{
|
||||
"accessory": "WeMo",
|
||||
"name": "Coffee Maker"
|
||||
}
|
||||
],
|
||||
|
||||
"platforms": [
|
||||
{
|
||||
"platform" : "PhilipsHue",
|
||||
"name" : "Hue"
|
||||
}
|
||||
]
|
||||
}
|
6
docker-compose.yaml
Normal file
6
docker-compose.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
homebridge:
|
||||
build: .
|
||||
net: host
|
||||
volumes:
|
||||
- ./config.json:/root/.homebridge/config.json
|
||||
- ./plugins.txt:/root/.homebridge/plugins.txt
|
2
plugins-sample.txt
Normal file
2
plugins-sample.txt
Normal file
@ -0,0 +1,2 @@
|
||||
homebridge-homeassistant
|
||||
homebridge-wemo
|
Loading…
Reference in New Issue
Block a user