Fix HA add-on: use Node 22 glibc tarball + gcompat (avoid musl libstdc++ symbol mismatch)
This commit is contained in:
@@ -19,22 +19,23 @@ RUN apk add --no-cache \
|
|||||||
libgcc \
|
libgcc \
|
||||||
libatomic \
|
libatomic \
|
||||||
file \
|
file \
|
||||||
pax-utils
|
pax-utils \
|
||||||
|
gcompat \
|
||||||
|
libc6-compat
|
||||||
|
|
||||||
# Install Node.js (musl) from unofficial builds (HA base images may not ship Node 22+)
|
# Install Node.js 22+ (glibc build) and run it on Alpine via gcompat.
|
||||||
|
# The musl Node builds can require newer libstdc++ symbols than HA base image provides.
|
||||||
RUN set -eu; \
|
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://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz"; \
|
||||||
echo "Downloading Node.js $NODE_VERSION (musl) from $url"; \
|
echo "Downloading Node.js $NODE_VERSION (glibc) from $url"; \
|
||||||
curl -fsSL "$url" -o /tmp/node.tar.xz; \
|
curl -fsSL "$url" -o /tmp/node.tar.xz; \
|
||||||
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; \
|
||||||
ls -la /usr/local/bin | head; \
|
|
||||||
ls -l /usr/local/bin/node /usr/local/bin/npm || true; \
|
ls -l /usr/local/bin/node /usr/local/bin/npm || true; \
|
||||||
file /usr/local/bin/node || true; \
|
file /usr/local/bin/node || true; \
|
||||||
scanelf -n /usr/local/bin/node || true; \
|
|
||||||
/usr/local/bin/node -v; /usr/local/bin/npm -v
|
/usr/local/bin/node -v; /usr/local/bin/npm -v
|
||||||
|
|
||||||
# Install clawdbot globally
|
# Install clawdbot globally
|
||||||
|
|||||||
Reference in New Issue
Block a user