Fix HA add-on: add runtime libs + diagnostics for Node 22 musl install

This commit is contained in:
TheLast
2026-01-27 20:02:39 +02:00
parent f78c560b4a
commit a8ca24f415
+11 -3
View File
@@ -16,9 +16,13 @@ RUN apk add --no-cache \
tar \ tar \
xz \ xz \
libstdc++ \ libstdc++ \
libgcc libgcc \
libatomic \
file \
pax-utils
RUN set -euo pipefail; \ # Install Node.js (musl) from unofficial builds (HA base images may not ship Node 22+)
RUN set -eu; \
arch=$(uname -m); \ arch=$(uname -m); \
if [ "$arch" != "x86_64" ]; then echo "Unsupported arch: $arch"; exit 1; fi; \ if [ "$arch" != "x86_64" ]; then echo "Unsupported arch: $arch"; exit 1; fi; \
url="https://unofficial-builds.nodejs.org/download/release/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64-musl.tar.xz"; \ url="https://unofficial-builds.nodejs.org/download/release/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64-musl.tar.xz"; \
@@ -27,7 +31,11 @@ RUN set -euo pipefail; \
mkdir -p /usr/local; \ mkdir -p /usr/local; \
tar -xJf /tmp/node.tar.xz -C /usr/local --strip-components=1; \ tar -xJf /tmp/node.tar.xz -C /usr/local --strip-components=1; \
rm -f /tmp/node.tar.xz; \ rm -f /tmp/node.tar.xz; \
node -v; npm -v ls -la /usr/local/bin | head; \
ls -l /usr/local/bin/node /usr/local/bin/npm || true; \
file /usr/local/bin/node || true; \
scanelf -n /usr/local/bin/node || true; \
/usr/local/bin/node -v; /usr/local/bin/npm -v
# Install clawdbot globally # Install clawdbot globally
RUN npm config set fund false && npm config set audit false \ RUN npm config set fund false && npm config set audit false \