[BUG] Claude's install.sh is broken for podman/docker image creation
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?
I have been using the Dockerfile as seen in the Additional Information and the build.sh script to build a podman image (for more details please see the _Additional Information_ section) to do the following:
- work around the fact that I run a non redhat-ubuntu distribution of linux native which is unsupported by anthropic and
- to launch the claude client in a podman container to restrict access to Claude to only the files and directories currently under development.
I spent several hours asking opus 4.8 and sonnet for help to diagnose and fix an error in my code or workaround the bug, but it was fruitless. Asking opus to take ownership, file and monitor the bug report was also fruitless.
Could you please do the following:
- Fix the regression in the install.sh script. During debugging we isolated it to the curl command in the container.
- Allow the claude models to submit bug reports when they cannot resolve issues in the installer themselves and for them to monitor the report and notify me when there is activity.
- Allow the claude models to test docker or podman image creation.
What Should Happen?
The image should be built correctly with the current claude terminal client installed.
Error Messages/Logs
Please notice the failure at STEP 7, this is reliably reproducible.
billmarcouno@localhost:~/repo/claude_container> bash -x ./scripts/build.sh 2>&1 | tee /tmp/build.txt
+ podman build -f ./images/Dockerfile -t claudecontainer
STEP 1/11: FROM ubuntu:24.04
STEP 2/11: ARG DEBIAN_FRONTEND=noninteractive
--> Using cache 04b550c83eb30a1b76d1ffde431ebf45ac69454a192b8af8b54b119e439b85ee
--> 04b550c83eb3
STEP 3/11: RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates git vim konsole konqueror libdbus-1-3 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 && apt-get clean && rm -rf /var/lib/apt/lists/*
--> Using cache c0d993fb091e9e131c635e100dbb0925a0ece16534e0787fdccd2acdbbeb0936
--> c0d993fb091e
STEP 4/11: WORKDIR /workspace
--> Using cache 5ed64085f771eb95edcfaa0a5b126a4ceb1b9ee95e57323ca2deefcab8780b7f
--> 5ed64085f771
STEP 5/11: ENV HOME=/workspace
--> Using cache 2d998a6bbcda08aa809515ee8b1eff3763cd484e8252567c1acc432ee7d16c43
--> 2d998a6bbcda
STEP 6/11: RUN cp -p /root/.bashrc /workspace && chmod -R 777 /workspace
--> Using cache 1d64c400deed1d240990981dcf4e2f87d54657c088fb644773b62f97654e2172
--> 1d64c400deed
STEP 7/11: RUN curl -fsSL https://claude.ai/install.sh | bash
curl: (23) Failure writing output to destination
Download failed
Error: building at STEP "RUN curl -fsSL https://claude.ai/install.sh | bash": while running runtime: exit status 1
Steps to Reproduce
- You should have a native linux install including your distribution's
podman,bashandcurlpackages (although a similar behavior would be expected in docker). - Create a work directory, in my case I used
~/repo/claudecontainer, in linux I domkdir ~/repo/claude_container. pushd ~/repo/claude_containermkdir images- create the docker/podman file named
images/Dockerfileusing a text editor or ide of your choice. Please see the Additional information section for the contents of theDockerfile. mkdir scripts- create the bash file named
scripts/build.shusing a text editor of ide of your choice. Please see the Additional information section for the contents of thebuild.sh. - run the command
bash -x scripts/build.shto attempt the build. - Observe the failure.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
I should have captured this information before it happened. According to git it worked as of April, 28, 2026.
Claude Code Version
Does not apply
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
Other
Additional Information
The ~/repo/claudecontainer/images/Dockerfile looks like
# ============================================================
# Containerfile — Ubuntu-based Claude Code environment
# Build: podman build -t claude-env .
# Run: podman run -it --rm \
# -e ANTHROPIC_API_KEY=<your-key> \
# claude-env
# ============================================================
FROM ubuntu:24.04
# ---------- build arguments ----------
ARG DEBIAN_FRONTEND=noninteractive
# ---------- system packages ----------
RUN apt-get update && apt-get install -y --no-install-recommends \
# core utilities
curl \
ca-certificates \
git \
# editor
vim \
# terminal emulator (pulls in minimal KDE deps)
konsole \
# browser - I initially tried firefox but it resolves as a snap package which does not work inside a container
konqueror \
# X11 / Wayland libs needed by GUI apps inside a container
libdbus-1-3 \
libxcb-icccm4 \
libxcb-image0 \
libxcb-keysyms1 \
libxcb-render-util0 \
libxcb-xinerama0 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Default working directory, do this before install to install claude in a sensible location
WORKDIR /workspace
# Trick installer to treat workspace as the home directory
ENV HOME=/workspace
# We want workspace to be writable by the user at runtime
RUN cp -p /root/.bashrc /workspace && chmod -R 777 /workspace
# ---------- Claude Code (native binary — no Node.js required) ----------
# The installer places the binary at ~/.local/bin/claude or ~/.claude/bin/claude
# and updates PATH in ~/.bashrc. We install as root so it lands in a
# system-wide location, then expose the path explicitly.
RUN curl -fsSL https://claude.ai/install.sh | bash
RUN cat /root/.bashrc
# Make sure the binary is on PATH for all users / including login shells
ENV PATH="/workspace/.claude/bin:/workspace/.local/bin:${PATH}"
# ---------- runtime configuration ----------
# Pass your Anthropic API key at 'podman run' time with -e.
# Never bake a real key into an image.
ENV ANTHROPIC_API_KEY=""
# ---------- default command ----------
# Starts an interactive bash shell. From here (or from konsole) you can
# launch Claude Code by simply typing: claude
CMD ["bash"]
The ~/repo/claude_container/scripts/build.sh file looks like
#!/bin/bash
podman build -f ./images/Dockerfile -t claudecontainerThis issue has 3 comments on GitHub. Read the full discussion on GitHub ↗