[BUG] Claude Code installer OOM when run as root during Docker build

Resolved 💬 4 comments Opened Feb 2, 2026 by phaulos Closed Mar 3, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

The Claude Code installer script (https://claude.ai/install.sh) consumes excessive memory when run as root during a Docker container build, causing the build to be killed by the OOM killer. This seems to be a recent regression as container builds started failing today (2026-02-02).

What Should Happen?

The installer should work without excessive memory consumption regardless of the current working directory.

Error Messages/Logs

Steps to Reproduce

  1. Create a Dockerfile with:
FROM ubuntu:24.04
RUN apt-get update && apt-get install -y curl
RUN curl -fsSL https://claude.ai/install.sh | bash
  1. Build the image:
docker build .
  1. The build process consumes excessive memory and gets OOM-killed.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.29

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

Workaround

Running the installer from a non-root directory (i.e., not /) avoids the issue:

RUN mkdir /tmp/claude-install && cd /tmp/claude-install \
    && curl -fsSL https://claude.ai/install.sh | bash \
    && rm -rf /tmp/claude-install

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗