From f85ff9187364d278278fa44c11952732b0205d17 Mon Sep 17 00:00:00 2001 From: Udo Waechter Date: Thu, 12 Nov 2020 18:03:29 +0100 Subject: [PATCH] doesn;t work yet --- apps/smarthome/Dockerfile | 40 +++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/apps/smarthome/Dockerfile b/apps/smarthome/Dockerfile index 9ec4fc3..dfa7705 100644 --- a/apps/smarthome/Dockerfile +++ b/apps/smarthome/Dockerfile @@ -1,32 +1,36 @@ -FROM node:current-buster-slim +FROM node:current-buster # Set the commit of Zwave2Mqtt to checkout when cloning the repo ENV Z2M_VERSION=9cc3740740b57f1e896139b5ffdb25be7576ad58 ENV DEBIAN_FRONTEND noninteractive -# Install required dependencies -RUN apt update -y && \ - apt full-upgrade -y && \ - apt autoremove -y && \ - apt clean -y +#setup local apt cache +RUN sed -i 's@http://@http://apt-cache.lan/@g' /etc/apt/sources.list +#/apt-cache +# Install required dependencies +RUN apt update -y +RUN apt full-upgrade -y + +# Packages we need RUN apt install -y \ - socat libopenzwave1.5 npm git + socat libopenzwave1.5 npm git # Clone Zwave2Mqtt build pkg files and move them to /dist/pkg -RUN npm config set unsafe-perm true && npm install -g pkg \ - && cd /root \ - && git clone https://github.com/OpenZWave/Zwave2Mqtt.git \ - && cd Zwave2Mqtt \ - && git checkout ${Z2M_VERSION} \ - && npm install \ - && npm run build +RUN npm config set unsafe-perm true && npm install -g pkg +RUN cd /root \ + && git clone https://github.com/OpenZWave/Zwave2Mqtt.git \ + && cd Zwave2Mqtt \ + && git checkout ${Z2M_VERSION} \ + && npm install \ + && npm run build # Clean up -RUN rm -rf /root/* && \ - apt-get clean -y && \ - rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - +RUN apt autoremove -y +RUN apt clean -y +RUN rm -rf /root/* +RUN apt-get clean -y +RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* COPY --from=build /dist/lib/ /lib/ COPY --from=build /dist/pkg /usr/src/app