Skip to content

Commit 4d9cc91

Browse files
author
root
committed
Switch base to Debian Bookworm; add Pi arch support; update OpenClaw + ttyd
1 parent e307670 commit 4d9cc91

4 files changed

Lines changed: 31 additions & 33 deletions

File tree

openclaw_assistant/Dockerfile

Lines changed: 24 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
ARG BUILD_FROM=ghcr.io/hassio-addons/base:14.0.2
1+
ARG BUILD_FROM
22
FROM ${BUILD_FROM}
33

4-
# Base image is Alpine (HA add-ons base). It may only provide Node 18.x.
5-
# OpenClaw requires Node 20+, so we install a Node 20 musl build directly.
6-
ARG NODE_VERSION=22.12.0
4+
# Base image is Debian Bookworm (glibc). This avoids musl-related native module issues
5+
# that occur on Alpine (e.g. clipboard, node-llama-cpp).
76

8-
RUN apk add --no-cache \
7+
# Install base packages (without nodejs/npm - we'll get Node 22 from NodeSource)
8+
RUN apt-get update && apt-get install -y --no-install-recommends \
99
bash \
1010
git \
1111
openssh-client \
@@ -14,37 +14,31 @@ RUN apk add --no-cache \
1414
jq \
1515
curl \
1616
tar \
17-
xz \
18-
libstdc++ \
19-
libgcc \
20-
libatomic \
17+
xz-utils \
2118
file \
22-
pax-utils \
2319
python3 \
2420
nginx \
25-
ttyd
26-
27-
# Install Node.js 22+ (musl build) from unofficial builds.
28-
# Router/base image Alpine may ship an older libstdc++; we pull a newer libstdc++ from edge to satisfy Node's C++ symbols.
29-
RUN set -eu; \
30-
arch=$(uname -m); \
31-
if [ "$arch" != "x86_64" ]; then echo "Unsupported arch: $arch"; exit 1; fi; \
32-
url="https://unofficial-builds.nodejs.org/download/release/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64-musl.tar.xz"; \
33-
echo "Downloading Node.js $NODE_VERSION (musl) from $url"; \
34-
curl -fsSL "$url" -o /tmp/node.tar.xz; \
35-
mkdir -p /usr/local; \
36-
tar -xJf /tmp/node.tar.xz -C /usr/local --strip-components=1; \
37-
rm -f /tmp/node.tar.xz; \
38-
echo "Upgrading libstdc++/libgcc/libatomic from Alpine edge for Node compatibility"; \
39-
apk add --no-cache --upgrade \
40-
--repository=https://dl-cdn.alpinelinux.org/alpine/edge/main \
41-
--repository=https://dl-cdn.alpinelinux.org/alpine/edge/community \
42-
libstdc++ libgcc libatomic; \
43-
/usr/local/bin/node -v; /usr/local/bin/npm -v
21+
gnupg \
22+
&& apt-get clean \
23+
&& rm -rf /var/lib/apt/lists/*
24+
25+
# Install Node.js 22 LTS from NodeSource (Debian Bookworm ships Node 18, but OpenClaw requires 20+)
26+
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
27+
&& apt-get install -y nodejs \
28+
&& apt-get clean \
29+
&& rm -rf /var/lib/apt/lists/*
30+
31+
# Install ttyd (web terminal) - not in Debian repos, download binary
32+
ARG TARGETARCH
33+
RUN ARCH=$(echo ${TARGETARCH:-$(dpkg --print-architecture)} | sed 's/aarch64/arm64/;s/armv7/armhf/;s/amd64/x86_64/') \
34+
&& curl -fsSL "https://github.com/tsl0922/ttyd/releases/download/1.7.7/ttyd.${ARCH}" -o /usr/local/bin/ttyd \
35+
&& chmod +x /usr/local/bin/ttyd
36+
37+
RUN node -v && npm -v
4438

4539
# Install OpenClaw globally
4640
RUN npm config set fund false && npm config set audit false \
47-
&& npm install -g openclaw@2026.1.29
41+
&& npm install -g openclaw@2026.1.30
4842

4943
COPY run.sh /run.sh
5044
COPY nginx.conf.tpl /etc/nginx/nginx.conf.tpl

openclaw_assistant/build.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
build_from:
2-
amd64: ghcr.io/hassio-addons/base:14.0.2
2+
amd64: ghcr.io/home-assistant/amd64-base-debian:bookworm
3+
aarch64: ghcr.io/home-assistant/aarch64-base-debian:bookworm
4+
armv7: ghcr.io/home-assistant/armv7-base-debian:bookworm

openclaw_assistant/config.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
name: OpenClaw Assistant
2-
version: "0.5.23"
2+
version: "0.5.24"
33
slug: openclaw_assistant
44
description: Run OpenClaw Assistant (OpenClaw-compatible) as a Home Assistant add-on.
55
url: https://github.com/techartdev/OpenClawHomeAssistant
66
arch:
77
- amd64
8+
- aarch64
9+
- armv7
810
startup: services
911
boot: auto
1012
init: false

openclaw_assistant/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ GW_PID=$!
189189
# Start web terminal (optional)
190190
if [ "$ENABLE_TERMINAL" = "true" ]; then
191191
echo "Starting web terminal (ttyd) on 127.0.0.1:7681 ..."
192-
ttyd -i 127.0.0.1 -p 7681 -b /terminal bash &
192+
ttyd -W -i 127.0.0.1 -p 7681 -b /terminal bash &
193193
TTYD_PID=$!
194194
else
195195
echo "Terminal disabled (enable_terminal=false)"

0 commit comments

Comments
 (0)