homebridge / docker-homebridge

Homebridge Docker. HomeKit support for the impatient using Docker on x86_64, Raspberry Pi (armhf) and ARM64. Includes ffmpeg + libfdk-aac.
https://hub.docker.com/r/homebridge/homebridge/
GNU General Public License v3.0
2.57k stars 241 forks source link

Instructions on how to use plugin from local source code #424

Closed sebbegg closed 2 years ago

sebbegg commented 2 years ago

Describe Your Problem: I'm trying to test a plugin that I have forked and modified locally. I'd obviously like to include that in the docker image. I'm not totally familiar with npm and especially how that's handled in homebridge with plugins, so I hope this isn't something obvious.

Are there instructions as to what the recommended procedure is?

FROM oznu/homebridge:latest

ADD . /hmip/  # add local clone of https://github.com/thkl/homebridge-homematic
RUN npm install /hmip && \
    npm list

I also played with some alternative dockerfiles using npm link or a npm install -g /hmip. In none of my tests I managed to get my modified code running in homebridge.

I'm guessing that maybe the startup procedure that installs plugins overwrites the locally installed version?

Logs:

Show the Docker container logs here

Docker Start Command: I use docker-compose:

version: "3"
services:
  homebridge:
    build:
      context: .
    image: my-homebridge:latest
    #image: oznu/homebridge
    command: ["-D", "-I"]
    restart: always
    environment:
      - TZ=Europe/Berlin
      - PGID=1000
      - PUID=1000
      - HOMEBRIDGE_CONFIG_UI=1
      - HOMEBRIDGE_CONFIG_UI_PORT=8080
      - HOMEBRIDGE_DEBUG=1
      - DEBUG=alexa*
    ports:
      - ...

Homebridge Config:

Show your homebridge config.json here

Screenshots:

Environment:

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

riteesh3 commented 5 months ago

Hello,

Did you find any solution to run docker with local test plugin for development?