-
Notifications
You must be signed in to change notification settings - Fork 39
Description
Description
Upgrading to version 1.7.0 fails during Docker image build with exit code 137 (OOM killed). The Claude installer's internal install
command is too memory-intensive for constrained HA Supervisor builds.
Error
[3/8] RUN curl -fsSL https://claude.ai/install.sh | bash ...
5.212 Setting up Claude Code...
17.10 bash: line 150: 23 Killed "$binary_path" install ${TARGET:+"$TARGET"}
ERROR: failed to solve: process did not complete successfully: exit code: 137
Environment
- Home Assistant OS with ~4GB RAM
- Stopped other add-ons before attempting - still fails
Root Cause
The official installer script runs claude install after downloading, which spawns the binary and exceeds Docker build memory limits.
Suggested Fix
Download the binary directly instead of using the interactive installer:
Download Claude CLI binary directly (skip memory-intensive installer)
RUN ARCH=$(uname -m) \
&& if [ "$ARCH" = "x86_64" ]; then ARCH="x64"; fi \
&& if [ "$ARCH" = "aarch64" ]; then ARCH="arm64"; fi \
&& mkdir -p /root/.local/bin \
&& curl -fsSL "https://github.com/anthropics/claude-code/releases/latest/download/claude-cli-linux-${ARCH}.tar.gz" \
-o /tmp/claude.tar.gz \
&& tar -xzf /tmp/claude.tar.gz -C /root/.local/bin \
&& ln -sf /root/.local/bin/claude /usr/local/bin/claude \
&& rm /tmp/claude.tar.gz
This avoids running the binary during build and should work within HA's memory constraints.