Skip to content

Commit 1d3515a

Browse files
committed
Build a Debian image
1 parent d3dd429 commit 1d3515a

File tree

1 file changed

+8
-23
lines changed

1 file changed

+8
-23
lines changed

Earthfile

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
VERSION 0.7
22

3-
FROM alpine:3.18
3+
FROM debian:12-slim
44

55
WORKDIR /app
66

7-
RUN apk add --no-cache \
8-
nodejs=18.18.2-r0 \
9-
tzdata
7+
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
8+
nodejs
109

1110
all:
1211
BUILD \
@@ -22,40 +21,26 @@ test:
2221
--platform=linux/arm64 \
2322
+docker-test
2423

25-
build-deps:
26-
RUN apk add --no-cache \
27-
g++ \
28-
git \
29-
linux-headers \
30-
make \
31-
npm \
32-
python3
33-
24+
build:
25+
RUN apt-get install -y \
26+
npm
3427
RUN npm config set \
3528
fetch-retries 5 \
3629
fetch-retry-mintimeout 100000 \
3730
fetch-retry-maxtimeout 600000
3831

39-
build:
40-
FROM +build-deps
41-
4232
ARG --required ZWAVE_JS_VERSION
4333
ARG --required ZWAVE_JS_SERVER_VERSION
4434
ARG ZWAVE_JS_PACKAGE=zwave-js@$ZWAVE_JS_VERSION
4535
ARG ZWAVE_JS_SERVER_PACKAGE=@zwave-js/server@$ZWAVE_JS_SERVER_VERSION
4636
ARG ZWAVE_JS_FLASH_PACKAGE=@zwave-js/flash@$ZWAVE_JS_VERSION
4737
ARG NPM_INSTALL_EXTRA_FLAGS
4838

49-
# Prebuilt binaries for node serialport and Alpine are broken, so we
50-
# rebuild from source:
51-
# https://github.com/serialport/bindings-cpp/issues/139
52-
# https://github.com/serialport/node-serialport/issues/2438
5339
RUN npm install \
5440
$NPM_INSTALL_EXTRA_FLAGS \
5541
$ZWAVE_JS_SERVER_PACKAGE \
5642
$ZWAVE_JS_FLASH_PACKAGE \
57-
$ZWAVE_JS_PACKAGE \
58-
&& npm rebuild --prefer-offline --build-from-source @serialport/bindings-cpp
43+
$ZWAVE_JS_PACKAGE
5944

6045
SAVE ARTIFACT /app
6146

@@ -70,7 +55,7 @@ docker:
7055
/cache/db \
7156
/logs
7257

73-
RUN apk add --no-cache \
58+
RUN apt-get install -y \
7459
tini
7560

7661
ARG EARTHLY_GIT_SHORT_HASH

0 commit comments

Comments
 (0)