patrickbusch / homebridge-docker Goto Github PK
View Code? Open in Web Editor NEWDockerized homebridge - HomeKit support for the impatient
License: Apache License 2.0
Dockerized homebridge - HomeKit support for the impatient
License: Apache License 2.0
Make it easier to install plugins and decide what plugins are installed at first.
Make a command in homebridge.sh:
./homebridge.sh install <package-name>
which would simply run npm-install inside the container.
Make a file called plugins.json
[
"package-name",
"package-name2"
]
This file is checked when the image is built and if it exists, all the packages are installed.
I hope my intentions are somewhat clear.
I could submit a PR if needed.
./homebridge.sh build
sed: -e expression #1, char 1: unknown command: `.'
as a consequence of that error, the build process does not install nodejs
wouldn't it be a good idea to move the config.son out of the container so that the config could be modified without rebuilding the container?
unfortunately I cannot get it to run - I always get dos error. Anahi is running outside of the container. And I purged the persist folder as well...
any ideas?
/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/mdns/lib/advertisement.js:56
dns_sd.DNSServiceRegister(self.serviceRef, flags, ifaceIdx, name,
^
Error: dns service error: unknown
at Error (native)
at new Advertisement (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/mdns/lib/advertisement.js:56:10)
at Object.create [as createAdvertisement] (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/mdns/lib/advertisement.js:64:10)
at Advertiser.startAdvertising (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Advertiser.js:43:30)
at Bridge.Accessory._onListening (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:510:20)
at HAPServer.emit (events.js:104:17)
at HAPServer._onListening (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:182:8)
at EventedHTTPServer.emit (events.js:104:17)
at EventedHTTPServer.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/eventedhttp.js:62:10)
at Server.emit (events.js:104:17)
Hi,
when I first try to start the container I get the following error:
./homebridge.sh run
Unable to find image 'patrickbusch/homebridge:0.1-SNAPSHOT' locally
Pulling repository docker.io/patrickbusch/homebridge
Error: image patrickbusch/homebridge:0.1-SNAPSHOT not found
any idea?
Any idea why this might be happening?
Step 11 : RUN wget -O - -q https://apt.adafruit.com/apt.adafruit.com.gpg.key | apt-key add -
---> Running in ded7b13b046b
gpg: no valid OpenPGP data found.
The command '/bin/sh -c wget -O - -q https://apt.adafruit.com/apt.adafruit.com.gpg.key | apt-key add -' returned a non-zero code: 2
I can run this
wget -O - -q https://apt.adafruit.com/apt.adafruit.com.gpg.key | apt-key add -
on the host and do not get a problem...
Out of the box I get
The path /etc/homebridge
is not shared from OS X and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.
on OS X Sierra, when running ./homebridge.sh run
(build ran successful). I have Docker 1.12.3 (stable channel).
I'm sure this is easy to resolve but I have to run now and already wanted to log this here and now ๐
I guess I can solve this by making /etc
accessible to the container, but I am not entirely sure I want this. Maybe it's smarter to expose a ./homebridge
file instead?
Fyi...just tried out your project on raspberry pi and got the following error after running the built docker image...
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
sed: can't read /etc/avahi/avahi-daemon.conf: No such file or directory
/root/run.sh: line 5: dbus-daemon: command not found
/root/run.sh: line 6: avahi-daemon: command not found
*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node>
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister>
/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Camera.js:28
let options = {
^^^
SyntaxError: Unexpected strict mode reserved word
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/index.js:3:14)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
...looks like the Dockerfile is installing an older version of nodejs.
security wise it would be better if home bridge could be run as a unprivileged user...
I am using a forked version that cbrandlehner has and was wondering if any of you have seen this error? I have the server running in a Docker Container on my Synology NAS and the server will run for a while and then crash. After a reboot of the NAS, it will not immediately start and crashes with the same error. It does function for a while. Any idea what this crash might be from?
Homebridge is running on port 51826.
/usr/lib/node_modules/homebridge/node_modules/mdns/lib/advertisement.js:56
dns_sd.DNSServiceRegister(self.serviceRef, flags, ifaceIdx, name,
Error: dns service error: unknown
at Error (native)
at new Advertisement (/usr/lib/node_modules/homebridge/node_modules/mdns/lib/advertisement.js:56:10)
at Object.create [as createAdvertisement] (/usr/lib/node_modules/homebridge/node_modules/mdns/lib/advertisement.js:64:10)
at Advertiser.startAdvertising (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Advertiser.js:43:30)
at Bridge.Accessory._onListening (/usr/lib/node_modules/homebridge/node_modules/hap- nodejs/lib/Accessory.js:498:20)
at emitNone (events.js:80:13)
at HAPServer.emit (events.js:179:7)
at HAPServer._onListening (/usr/lib/node_modules/homebridge/node_modules/hap- nodejs/lib/HAPServer.js:169:8)
at emitNone (events.js:80:13)
at EventedHTTPServer.emit (events.js:179:7)
I jsut ran ./homebridge.sh build
on Ubuntu 16.04 Server and I get this error
adysan@adyNUC:~/git/homebridge-docker$ ./homebridge.sh build
sed: -e expression #1, char 1: unknown command: `.'
Sending build context to Docker daemon 116.7 kB
Step 1/18 : FROM debian:jessie
---> a25c1eed1c6f
Step 2/18 : MAINTAINER Patrick Busch <[email protected]>
---> Using cache
---> 462b24e58109
Step 3/18 : RUN apt-get update
---> Using cache
---> 11e9e072b148
Step 4/18 : ENV LANG en_US.UTF-8
---> Using cache
---> 46bd6a1c3bbc
Step 5/18 : ENV LC_ALL en_US.UTF-8
---> Using cache
---> 8188e52d5cf3
Step 6/18 : ENV DEBIAN_FRONTEND noninteractive
---> Using cache
---> 3b9683fe5370
Step 7/18 : ENV TERM xterm
---> Using cache
---> 8a46cb483006
Step 8/18 : RUN apt-get install -y curl wget git apt-transport-https python build-essential make g++ libavahi-compat-libdnssd-dev libkrb5-dev vim net-tools
---> Using cache
---> e1f2c4455c37
Step 9/18 : RUN alias ll='ls -alG'
---> Using cache
---> 31a5d5ea5177
Step 10/18 : RUN npm install -g homebridge
---> Running in 0feae76d7c2c
/bin/sh: 1: npm: not found
The command '/bin/sh -c npm install -g homebridge' returned a non-zero code: 127
./homebridge-pi.sh build
Sending build context to Docker daemon 111.6 kB
Step 1 : FROM resin/rpi-raspbian:jessie
---> 35a28f38c0bb
Step 2 : MAINTAINER Patrick Busch <[email protected]>
---> Using cache
---> 3263e1f87cb5
Step 3 : RUN apt-get update
---> Using cache
---> 21ab4a37f7a2
Step 4 : ENV LANG en_US.UTF-8
---> Using cache
---> e71912a3305b
Step 5 : ENV LC_ALL en_US.UTF-8
---> Using cache
---> 21d69df1d7fa
Step 6 : ENV DEBIAN_FRONTEND noninteractive
---> Using cache
---> c2c213eff996
Step 7 : ENV TERM xterm
---> Using cache
---> d4d10c8c56df
Step 8 : RUN apt-get install -y curl wget git apt-transport-https python build-essential make g++ libavahi-compat-libdnssd-dev libkrb5-dev vim net-tools
---> Running in 1c2468611ac7
Reading package lists...
Building dependency tree...
E: Unable to locate package curl
E: Unable to locate package wget
E: Unable to locate package git
E: Unable to locate package apt-transport-https
E: Unable to locate package python
E: Unable to locate package build-essential
E: Unable to locate package make
E: Unable to locate package libavahi-compat-libdnssd-dev
E: Unable to locate package libkrb5-dev
E: Unable to locate package vim
E: Unable to locate package net-tools
The command '/bin/sh -c apt-get install -y curl wget git apt-transport-https python build-essential make g++ libavahi-compat-libdnssd-dev libkrb5-dev vim net-tools' returned a non-zero code: 100
any idea why that might happen?
Hi, I am trying to get this working but am having trouble. I cloned the repo, added my config.json file and then ran ./homebridge.sh build
and got:
~/homebridge-docker$ ./homebridge.sh build
sed: -e expression #1, char 1: unknown command: `.'
Sending build context to Docker daemon 116.2 kB
Step 1 : FROM debian:jessie
---> 23cb15b0fcec
Step 2 : MAINTAINER Patrick Busch <[email protected]>
---> Using cache
---> c855dba22676
Step 3 : RUN apt-get update
---> Using cache
---> 51d38427a38c
Step 4 : ENV LANG en_US.UTF-8
---> Using cache
---> a2da2c7a72b1
Step 5 : ENV LC_ALL en_US.UTF-8
---> Using cache
---> 406786b1398e
Step 6 : ENV DEBIAN_FRONTEND noninteractive
---> Using cache
---> f9440dcd0709
Step 7 : ENV TERM xterm
---> Using cache
---> 7bd790c54b9c
Step 8 : RUN apt-get install -y curl wget git apt-transport-https python build-essential make g++ libavahi-compat-libdnssd-dev libkrb5-dev vim net-tools
---> Using cache
---> 068a27640612
Step 9 : RUN alias ll='ls -alG'
---> Using cache
---> 5f46cecdb45e
Step 10 : RUN npm install -g homebridge
---> Running in 513493eaa828
/bin/sh: 1: npm: not found
The command '/bin/sh -c npm install -g homebridge' returned a non-zero code: 127
Any ideas?
Hi.
Could you, please, explain me - can homebridge docker container be run in non host network (bridge or overlay) ?
I am trying to run homebridge as service in docker swarm mode. And in that mode host network can't be used.
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.