doesn;t work yet

This commit is contained in:
2020-11-12 18:03:29 +01:00
parent 62cb2881c2
commit f85ff91873

View File

@@ -1,21 +1,24 @@
FROM node:current-buster-slim FROM node:current-buster
# Set the commit of Zwave2Mqtt to checkout when cloning the repo # Set the commit of Zwave2Mqtt to checkout when cloning the repo
ENV Z2M_VERSION=9cc3740740b57f1e896139b5ffdb25be7576ad58 ENV Z2M_VERSION=9cc3740740b57f1e896139b5ffdb25be7576ad58
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
# Install required dependencies #setup local apt cache
RUN apt update -y && \ RUN sed -i 's@http://@http://apt-cache.lan/@g' /etc/apt/sources.list
apt full-upgrade -y && \ #/apt-cache
apt autoremove -y && \
apt clean -y
# Install required dependencies
RUN apt update -y
RUN apt full-upgrade -y
# Packages we need
RUN apt install -y \ 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 # Clone Zwave2Mqtt build pkg files and move them to /dist/pkg
RUN npm config set unsafe-perm true && npm install -g pkg \ RUN npm config set unsafe-perm true && npm install -g pkg
&& cd /root \ RUN cd /root \
&& git clone https://github.com/OpenZWave/Zwave2Mqtt.git \ && git clone https://github.com/OpenZWave/Zwave2Mqtt.git \
&& cd Zwave2Mqtt \ && cd Zwave2Mqtt \
&& git checkout ${Z2M_VERSION} \ && git checkout ${Z2M_VERSION} \
@@ -23,10 +26,11 @@ RUN npm config set unsafe-perm true && npm install -g pkg \
&& npm run build && npm run build
# Clean up # Clean up
RUN rm -rf /root/* && \ RUN apt autoremove -y
apt-get clean -y && \ RUN apt clean -y
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 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/lib/ /lib/
COPY --from=build /dist/pkg /usr/src/app COPY --from=build /dist/pkg /usr/src/app