Switch base to Debian Bookworm; add Pi arch support; update OpenClaw + ttyd

This commit is contained in:
root
2026-02-01 19:44:02 +02:00
parent e307670421
commit 4d9cc91e80
4 changed files with 30 additions and 32 deletions
+23 -29
View File
@@ -1,11 +1,11 @@
ARG BUILD_FROM=ghcr.io/hassio-addons/base:14.0.2 ARG BUILD_FROM
FROM ${BUILD_FROM} FROM ${BUILD_FROM}
# Base image is Alpine (HA add-ons base). It may only provide Node 18.x. # Base image is Debian Bookworm (glibc). This avoids musl-related native module issues
# OpenClaw requires Node 20+, so we install a Node 20 musl build directly. # that occur on Alpine (e.g. clipboard, node-llama-cpp).
ARG NODE_VERSION=22.12.0
RUN apk add --no-cache \ # Install base packages (without nodejs/npm - we'll get Node 22 from NodeSource)
RUN apt-get update && apt-get install -y --no-install-recommends \
bash \ bash \
git \ git \
openssh-client \ openssh-client \
@@ -14,37 +14,31 @@ RUN apk add --no-cache \
jq \ jq \
curl \ curl \
tar \ tar \
xz \ xz-utils \
libstdc++ \
libgcc \
libatomic \
file \ file \
pax-utils \
python3 \ python3 \
nginx \ nginx \
ttyd gnupg \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install Node.js 22+ (musl build) from unofficial builds. # Install Node.js 22 LTS from NodeSource (Debian Bookworm ships Node 18, but OpenClaw requires 20+)
# Router/base image Alpine may ship an older libstdc++; we pull a newer libstdc++ from edge to satisfy Node's C++ symbols. RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
RUN set -eu; \ && apt-get install -y nodejs \
arch=$(uname -m); \ && apt-get clean \
if [ "$arch" != "x86_64" ]; then echo "Unsupported arch: $arch"; exit 1; fi; \ && rm -rf /var/lib/apt/lists/*
url="https://unofficial-builds.nodejs.org/download/release/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64-musl.tar.xz"; \
echo "Downloading Node.js $NODE_VERSION (musl) from $url"; \ # Install ttyd (web terminal) - not in Debian repos, download binary
curl -fsSL "$url" -o /tmp/node.tar.xz; \ ARG TARGETARCH
mkdir -p /usr/local; \ RUN ARCH=$(echo ${TARGETARCH:-$(dpkg --print-architecture)} | sed 's/aarch64/arm64/;s/armv7/armhf/;s/amd64/x86_64/') \
tar -xJf /tmp/node.tar.xz -C /usr/local --strip-components=1; \ && curl -fsSL "https://github.com/tsl0922/ttyd/releases/download/1.7.7/ttyd.${ARCH}" -o /usr/local/bin/ttyd \
rm -f /tmp/node.tar.xz; \ && chmod +x /usr/local/bin/ttyd
echo "Upgrading libstdc++/libgcc/libatomic from Alpine edge for Node compatibility"; \
apk add --no-cache --upgrade \ RUN node -v && npm -v
--repository=https://dl-cdn.alpinelinux.org/alpine/edge/main \
--repository=https://dl-cdn.alpinelinux.org/alpine/edge/community \
libstdc++ libgcc libatomic; \
/usr/local/bin/node -v; /usr/local/bin/npm -v
# Install OpenClaw globally # Install OpenClaw globally
RUN npm config set fund false && npm config set audit false \ RUN npm config set fund false && npm config set audit false \
&& npm install -g openclaw@2026.1.29 && npm install -g openclaw@2026.1.30
COPY run.sh /run.sh COPY run.sh /run.sh
COPY nginx.conf.tpl /etc/nginx/nginx.conf.tpl COPY nginx.conf.tpl /etc/nginx/nginx.conf.tpl
+3 -1
View File
@@ -1,2 +1,4 @@
build_from: build_from:
amd64: ghcr.io/hassio-addons/base:14.0.2 amd64: ghcr.io/home-assistant/amd64-base-debian:bookworm
aarch64: ghcr.io/home-assistant/aarch64-base-debian:bookworm
armv7: ghcr.io/home-assistant/armv7-base-debian:bookworm
+3 -1
View File
@@ -1,10 +1,12 @@
name: OpenClaw Assistant name: OpenClaw Assistant
version: "0.5.23" version: "0.5.24"
slug: openclaw_assistant slug: openclaw_assistant
description: Run OpenClaw Assistant (OpenClaw-compatible) as a Home Assistant add-on. description: Run OpenClaw Assistant (OpenClaw-compatible) as a Home Assistant add-on.
url: https://github.com/techartdev/OpenClawHomeAssistant url: https://github.com/techartdev/OpenClawHomeAssistant
arch: arch:
- amd64 - amd64
- aarch64
- armv7
startup: services startup: services
boot: auto boot: auto
init: false init: false
+1 -1
View File
@@ -189,7 +189,7 @@ GW_PID=$!
# Start web terminal (optional) # Start web terminal (optional)
if [ "$ENABLE_TERMINAL" = "true" ]; then if [ "$ENABLE_TERMINAL" = "true" ]; then
echo "Starting web terminal (ttyd) on 127.0.0.1:7681 ..." echo "Starting web terminal (ttyd) on 127.0.0.1:7681 ..."
ttyd -i 127.0.0.1 -p 7681 -b /terminal bash & ttyd -W -i 127.0.0.1 -p 7681 -b /terminal bash &
TTYD_PID=$! TTYD_PID=$!
else else
echo "Terminal disabled (enable_terminal=false)" echo "Terminal disabled (enable_terminal=false)"