patrickbusch / homebridge-docker

Dockerized homebridge - HomeKit support for the impatient
Apache License 2.0
62 stars 118 forks source link

Error on first start (run) #3

Closed benbeton closed 8 years ago

benbeton commented 8 years ago

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?

snizzleorg commented 8 years ago

well did you build it (./homebridge.sh build)? what does

docker ps -a show?
benbeton commented 8 years ago

hi,

because im on a Pi, I ran ./homebridge-pi.sh build

docker ps -a
CONTAINER ID        IMAGE                                                              COMMAND                  CREATED             STATUS                           PORTS               NAMES
dbd9cc1ff590        resin/rpi-raspbian                                                 "/bin/bash"              32 minutes ago      Exited (0) 31 minutes ago                            hopeful_sinoussi
28fc6bd1cde7        f0bf62277b63e195bb7c128c517c2c60d76d0aad5d7bb5f53cfd9a3b4723cb2f   "/bin/sh -c 'npm inst"   About an hour ago   Exited (137) 47 minutes ago                          cocky_hypatia
be6a01e31118        f0bf62277b63e195bb7c128c517c2c60d76d0aad5d7bb5f53cfd9a3b4723cb2f   "/bin/sh -c 'npm inst"   About an hour ago   Exited (137) About an hour ago                       grave_archimedes
cae951b56af1        f0bf62277b63e195bb7c128c517c2c60d76d0aad5d7bb5f53cfd9a3b4723cb2f   "/bin/sh -c 'npm inst"   About an hour ago   Exited (1) About an hour ago                         stupefied_archimedes
snizzleorg commented 8 years ago

and did the build succeed? or did you get errors?

all the containers are exited...

benbeton commented 8 years ago

Id had a few errors, but they are related to the harmony hub, (removed harmony hub from config) a rebuild was done (cashing a lot a steps )

can I initiate a complete rebuild ? (delete the current build)

snizzleorg commented 8 years ago

I think for this you would have to delete the images/containers

stop the container

docker stop {containername}
docker rm {containername} 
docker rmi $(docker ps -q)

But not sure if this is the best way to go about it.

patrickbusch commented 8 years ago

you can also rebuild with docker build --no-cache, that way you do not have to remove the images

benbeton commented 8 years ago

at first thank you for your help.

today I installed all from scratch (RPi1):

Raspbian: Jessie lite Image installed docker https://github.com/umiddelb/armhf/wiki/Get-Docker-up-and-running-on-the-RaspberryPi-(ARMv6)-in-four-steps-(Wheezy) Step 4 (version Docker 1.9.1)

At this point, docker sample app runs fine. (docker run -i -t resin/rpi-raspbian)

after that I did:

cd /home /pi
git clone https://github.com/patrickbusch/homebridge-docker.git
cd homebridge-docker
sudo ./homebrdige-pi.sh build 

errors that came up:

Step 8 

get:179 http://archive.raspbian.org/raspbian/ jessie/main libkrb5-dev armhf 1.12.1+dfsg-19+deb8u1 [42.3 kB]
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = "en_US.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
debconf: delaying package configuration, since apt-utils is not installed
Fetched 85.5 MB in 60s (1405 kB/s)
Step 14 : RUN npm install -g homebridge
 ---> Running in 7c69128af6b9

> curve25519@1.1.0 install /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/curve25519
> node-gyp rebuild

gyp WARN EACCES user "undefined" does not have permission to access the dev dir "/root/.node-gyp/0.12.6"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/curve25519/.node-gyp"
make: Entering directory '/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/curve25519/build'
  CXX(target) Release/obj.target/curve/node_curve.o
  SOLINK_MODULE(target) Release/obj.target/curve.node
  COPY Release/curve.node
make: Leaving directory '/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/curve25519/build'

> bignum@0.11.0 install /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/srp/node_modules/bignum
> node-gyp configure build

gyp WARN EACCES user "undefined" does not have permission to access the dev dir "/root/.node-gyp/0.12.6"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/srp/node_modules/bignum/.node-gyp"

last line, before finish:

Step 20 : ADD config.json /root/.homebridge/config.json
lstat config.json: no such file or directory
pi@razberry:~/homebridge-docker $

Seems that the container build did not succeed, right?!

$ ocker images
REPOSITORY           TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
<none>               <none>              01214f64e482        12 minutes ago      466.4 MB
resin/rpi-raspbian   jessie              35a28f38c0bb        12 days ago         122.3 MB
resin/rpi-raspbian   latest              35a28f38c0bb        12 days ago         122.3 MB
docker ps -a
CONTAINER ID        IMAGE                COMMAND             CREATED             STATUS                         PORTS               NAMES
f8d30ab0b570        resin/rpi-raspbian   "/bin/bash"         About an hour ago   Exited (0) About an hour ago                     sick_jones  

I hope anyone can give me a hint, that seems to be a good solution to run homebridge and pimatic, maybe the only one

snizzleorg commented 8 years ago

well the config.son file is missing. you have to create this (use the sample file as a help (or rename it)

benbeton commented 8 years ago

my bad, not the sample ist used, the productive one is needed BEFORE creating the container.

that did the trick, thanks!