Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Commit

Permalink
fix: removed installer layer
Browse files Browse the repository at this point in the history
  • Loading branch information
t0bst4r committed Jun 2, 2024
1 parent e1d437d commit 2c6d845
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions docker/Dockerfile
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

0 comments on commit 2c6d845

Please sign in to comment.