From cf6f6a8916801807f2b8891a3e350264cd09b5c9 Mon Sep 17 00:00:00 2001 From: Keith Pine Date: Sat, 9 Dec 2023 18:07:36 -0800 Subject: [PATCH 1/3] Build a Debian image --- Earthfile | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/Earthfile b/Earthfile index bc0408b..8522ebd 100644 --- a/Earthfile +++ b/Earthfile @@ -1,12 +1,11 @@ VERSION 0.7 -FROM alpine:3.18 +FROM debian:12-slim WORKDIR /app -RUN apk add --no-cache \ - nodejs=18.18.2-r0 \ - tzdata +RUN apt-get update && apt-get upgrade -y && apt-get install -y \ + nodejs all: BUILD \ @@ -22,23 +21,14 @@ test: --platform=linux/arm64 \ +docker-test -build-deps: - RUN apk add --no-cache \ - g++ \ - git \ - linux-headers \ - make \ - npm \ - python3 - +build: + RUN apt-get install -y \ + npm RUN npm config set \ fetch-retries 5 \ fetch-retry-mintimeout 100000 \ fetch-retry-maxtimeout 600000 -build: - FROM +build-deps - ARG --required ZWAVE_JS_VERSION ARG --required ZWAVE_JS_SERVER_VERSION ARG ZWAVE_JS_PACKAGE=zwave-js@$ZWAVE_JS_VERSION @@ -46,16 +36,11 @@ build: ARG ZWAVE_JS_FLASH_PACKAGE=@zwave-js/flash@$ZWAVE_JS_VERSION ARG NPM_INSTALL_EXTRA_FLAGS - # Prebuilt binaries for node serialport and Alpine are broken, so we - # rebuild from source: - # https://github.com/serialport/bindings-cpp/issues/139 - # https://github.com/serialport/node-serialport/issues/2438 RUN npm install \ $NPM_INSTALL_EXTRA_FLAGS \ $ZWAVE_JS_SERVER_PACKAGE \ $ZWAVE_JS_FLASH_PACKAGE \ - $ZWAVE_JS_PACKAGE \ - && npm rebuild --prefer-offline --build-from-source @serialport/bindings-cpp + $ZWAVE_JS_PACKAGE SAVE ARTIFACT /app @@ -70,7 +55,7 @@ docker: /cache/db \ /logs - RUN apk add --no-cache \ + RUN apt-get install -y \ tini ARG EARTHLY_GIT_SHORT_HASH From 17956a62b8035566d4c1538f4fd2413bf99a64bb Mon Sep 17 00:00:00 2001 From: Keith Pine Date: Tue, 6 Feb 2024 14:21:21 -0800 Subject: [PATCH 2/3] Try node image --- Earthfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Earthfile b/Earthfile index 8522ebd..802569b 100644 --- a/Earthfile +++ b/Earthfile @@ -1,11 +1,10 @@ VERSION 0.7 -FROM debian:12-slim +FROM node:20-slim WORKDIR /app -RUN apt-get update && apt-get upgrade -y && apt-get install -y \ - nodejs +RUN apt-get update && apt-get upgrade -y all: BUILD \ @@ -22,8 +21,6 @@ test: +docker-test build: - RUN apt-get install -y \ - npm RUN npm config set \ fetch-retries 5 \ fetch-retry-mintimeout 100000 \ From 9bf8aa10c2bf1eebffa282c481ff4318cd1581dc Mon Sep 17 00:00:00 2001 From: Keith Pine Date: Sat, 10 Feb 2024 07:43:14 -0800 Subject: [PATCH 3/3] Upgrade build to Z-Wave JS 12.4.4 --- .arg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.arg b/.arg index b55f22b..ee120d5 100644 --- a/.arg +++ b/.arg @@ -1,2 +1,2 @@ -ZWAVE_JS_VERSION=12.4.3 +ZWAVE_JS_VERSION=12.4.4 ZWAVE_JS_SERVER_VERSION=1.34.0