From 2c6d8452c8b82d8e3615f0c4f3c06e4e80ca5446 Mon Sep 17 00:00:00 2001 From: t0bst4r <82281152+t0bst4r@users.noreply.github.com> Date: Sun, 2 Jun 2024 15:56:42 +0200 Subject: [PATCH] fix: removed installer layer --- docker/Dockerfile | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index e7e605f..bbe677c 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -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