This repository has been archived by the owner on Nov 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
11 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,22 @@ | ||
FROM --platform=linux/amd64 node:20-alpine as installer | ||
FROM node:18-alpine | ||
|
||
EXPOSE 8283 | ||
EXPOSE 8284 | ||
|
||
ENV HOME_ASSISTANT_URL="" | ||
ENV HOME_ASSISTANT_ACCESS_TOKEN="" | ||
ENV HOME_ASSISTANT_CLIENT_CONFIG="{}" | ||
|
||
ENV MATTERBRIDGE_VERSION "1.2.19" | ||
ENV MATTERBRIDGE_HOME_ASSISTANT_VERSION "0.0.4" | ||
|
||
RUN npm install -g matterbridge@${MATTERBRIDGE_VERSION} | ||
RUN npm install -g matterbridge-home-assistant@${MATTERBRIDGE_HOME_ASSISTANT_VERSION} | ||
RUN npm install --no-audit -g \ | ||
matterbridge@${MATTERBRIDGE_VERSION} \ | ||
matterbridge-home-assistant@${MATTERBRIDGE_HOME_ASSISTANT_VERSION} | ||
|
||
RUN mkdir -p /root/.matterbridge/storage/.matterbridge | ||
RUN echo '{"key":"globalModulesDirectory","value":"/usr/local/lib/node_modules"}' > /root/.matterbridge/storage/.matterbridge/d01917a070027b55bce538a96fa2004f061de6fe1644f402a321c6db8c71b9ba | ||
|
||
RUN matterbridge -add matterbridge-home-assistant | ||
|
||
FROM node:20-alpine | ||
|
||
ENV HOME_ASSISTANT_URL="" | ||
ENV HOME_ASSISTANT_ACCESS_TOKEN="" | ||
ENV HOME_ASSISTANT_CLIENT_CONFIG="{}" | ||
|
||
EXPOSE 8283 | ||
EXPOSE 8284 | ||
|
||
COPY --from=installer /usr/local/lib/node_modules /usr/local/lib/node_modules | ||
COPY --from=installer /root/.matterbridge /root/.matterbridge | ||
|
||
CMD matterbridge -bridge |