From e7ad93b804471b3db17fd3ac0d71db8ccc9e82b4 Mon Sep 17 00:00:00 2001 From: V Aretakis Date: Fri, 18 Dec 2020 17:31:47 +0100 Subject: [PATCH] feat(docker): allow to update devices of driver during build (#86) --- docker/Dockerfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 3d9d9964ba7..b1e5eefcbf2 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,14 +1,16 @@ # ---------------- # STEP 1: FROM node:erbium-alpine AS build-z2m - +ARG updateDevices +ARG zwavejs=https://github.com/zwave-js/node-zwave-js # Install required dependencies RUN apk --no-cache add \ coreutils \ linux-headers \ alpine-sdk \ python \ - openssl + openssl \ + git rsync WORKDIR /root/zwavejs2mqtt @@ -25,6 +27,9 @@ RUN rm -rf \ src \ static \ stylesheets +RUN if [[ ! -z "$updateDevices" ]]; then git clone $zwavejs; \ + rsync -av node-zwave-js/packages/config/config/devices/ './node_modules/@zwave-js/config/config/devices'; \ + rm -rf node-zwave-js; fi # ---------------- # STEP 2: