joshgetter / hassio-addons

A Home Assistant Addon repository.
MIT License
52 stars 28 forks source link

Local Dev setup #17

Open fabriph opened 1 year ago

fabriph commented 1 year ago

Hey, thanks for writing this, super helpful! I'm trying to setup my local dev environment so I can poke at it. Did I understood correctly that I can run it without HA? I'm trying to run docker standalone but it's failing to resolve host supervisor. This is what I've so far:

Build image (AFAIK this works fine):

debian:~/dev/hassio-addons/kasa-camera$ sudo docker build . -t kasa-camera --build-arg BUILD_FROM=hassioaddons/base:latest

Run image:

debian:~/dev/hassio-addons/kasa-camera$ sudo docker run -p 3000:3000 kasa-camera
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing...
curl: (6) Could not resolve host: supervisor
[01:10:45] ERROR: Something went wrong contacting the API
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing...
parse error: Invalid numeric literal at line 2, column 0
parse error: Invalid numeric literal at line 2, column 0
/var/run/s6/etc/cont-init.d/01-log-level.sh: line 41: log_level: unbound variable
[cont-init.d] 01-log-level.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing...
-----------------------------------------------------------
               Oops! Something went wrong.

We are so sorry, but something went terribly wrong when
starting or running this add-on.

Be sure to check the log above, line by line, for hints.
-----------------------------------------------------------
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.