homebridge-wol on Docker homebridge : missing instructions on how to add ssh to docker to run remote commands #153
-
Hello. Running homebridge-wol on my Synology via Docker, I eventually groked that even if I can ssh from my NAS to my Mac, the Docker instance is not enabled to do so as it is missing the relevant /bin/ssh and the ssh keys would have to be added to the dockerized environment. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I can't necessarily recommend modifying a running Docker container. The "solution" to this is to create your own image by using FROM oznu/docker-homebridge
RUN apk add --no-cache openssh-client You may need to alter it a bit, but the idea is that you build that image and run it instead. For reference, here is the Dockefile I use: # Use the latest maintainance LTS version
FROM node:12-buster-slim
# Install dependencies
RUN apt-get update && \
apt-get install -y python3-pip iputils-ping && \
rm -rf /var/lib/apt/lists/*
USER node
ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
# Install plugins
RUN npm install --global --only=production homebridge homebridge-wol@beta homebridge-config-ui-x
VOLUME /var/homebridge
ENV PATH=/home/node/.npm-global/bin:$PATH
# Run Homebridge on start
CMD homebridge --user-storage-path /var/homebridge | tee /var/homebridge/log I'll include this in #148, however, as it seems quite common to run Homebridge using Docker. |
Beta Was this translation helpful? Give feedback.
I can't necessarily recommend modifying a running Docker container. The "solution" to this is to create your own image by using
oznu/docker-homebridge
as the base:You may need to alter it a bit, but the idea is that you build that image and run it instead.
For reference, here is the Dockefile I use: