Skip to content

fix(base-image): drop ppa:deadsnakes by switching to python:3.11-slim-bookworm (#658) - #810

Merged
vybe merged 1 commit into
devfrom
feature/658-base-image-deadsnakes-removal
May 12, 2026
Merged

vybe merged 1 commit into
devfrom
feature/658-base-image-deadsnakes-removal

Conversation

@dolho

@dolho dolho commented May 12, 2026

Copy link
Copy Markdown
Contributor

Summary

The agent base Dockerfile depended on ppa:deadsnakes/ppa for Python 3.11.
Launchpad PPAs have no SLA — ppa.launchpadcontent.net has been unreachable
for multi-day stretches, blocking docker build of the agent base image.
The #649 _kill_orphan_pipe_writers timeout fix was stranded on platform
containers for 3+ days because the PPA outage prevented the agent image
from being rebuilt.

Switch from ubuntu:22.04 + deadsnakes to python:3.11-slim-bookworm,
which ships Python 3.11 prebuilt and removes the PPA dependency entirely
(Option A in the issue's suggested-fix list).

Changes

  • Base: ubuntu:22.04 → python:3.11-slim-bookworm
  • Removed: software-properties-common, add-apt-repository ppa:deadsnakes/ppa,
    apt-get install python3.11 python3.11-venv python3.11-dev python3-pip,
    update-alternatives — all subsumed by the base image.
  • Docker-ce-cli apt repo: linux/ubuntu → linux/debian.
  • Added --no-install-recommends + matching rm -rf /var/lib/apt/lists/*
    on the package-installing RUN steps (smaller image, faster builds).

Verification

docker build -f docker/base-image/Dockerfile docker/base-image/ succeeds
end-to-end on a clean docker. Smoke-tested the resulting image:

Check Result
python3 --version Python 3.11.15
python3 -m pip --version pip 26.1.1
import fastapi, uvicorn, httpx, pydantic, yaml, rich, cryptography all ok
node --version v20.20.2
go version (/usr/local/go/bin/go) go1.23.4 linux/amd64
docker --version Docker version 29.4.3
claude --version 2.1.139 (Claude Code)
gemini --version 0.41.2
jq, sudo, ssh, container user developer (uid 1000), WORKDIR /home/developer all present

Test plan

  • Local clean docker build from docker/base-image/Dockerfile — succeeds.
  • Smoke-test all language runtimes + agent CLIs in the built image.
  • Rebuild & redeploy agent fleet on staging, verify agent containers start and chat works.
  • Watch for any agent-template assumption that's debian-vs-ubuntu sensitive (templates that apt-get install ubuntu-only packages, for example).

Relates to #658.

🤖 Generated with Claude Code

…n:3.11-slim-bookworm (#658)

The agent base Dockerfile depended on ppa:deadsnakes/ppa for Python 3.11.
Launchpad PPAs have no SLA — ppa.launchpadcontent.net has been
unreachable for multi-day stretches, blocking docker build of the agent
base image. The #649 _kill_orphan_pipe_writers timeout fix was stranded
on platform containers for 3+ days because the PPA outage prevented the
agent image from being rebuilt.

Switch the base from `ubuntu:22.04` to `python:3.11-slim-bookworm`,
which ships Python 3.11 prebuilt and removes the PPA dependency entirely.
This matches Option A in the issue's suggested-fix list.

Collateral edits:
  - Drop `software-properties-common` (no PPAs to add).
  - Drop the `python3.11 python3.11-venv python3.11-dev python3-pip`
    apt install + `update-alternatives` block (Python is in the base image
    at /usr/local/bin/python3, with pip bundled).
  - Point the docker-ce-cli apt repo at linux/debian instead of
    linux/ubuntu (lsb_release -cs is now `bookworm`).
  - Add `--no-install-recommends` to the apt installs to keep image size
    down on the slimmer base.
  - Add `rm -rf /var/lib/apt/lists/*` to the nodejs and docker-ce-cli
    RUN steps (the existing first RUN already did this).

## Verification

`docker build -f docker/base-image/Dockerfile docker/base-image/` succeeds
end-to-end. Smoke-tested the resulting image:

  - python3 --version → Python 3.11.15
  - python3 -m pip --version → pip 26.1.1
  - fastapi, uvicorn, httpx, pydantic, pyyaml, rich, cryptography all import
  - node --version → v20.20.2
  - /usr/local/go/bin/go version → go1.23.4 linux/amd64
  - docker --version → Docker version 29.4.3
  - claude --version → 2.1.139 (Claude Code)
  - gemini --version → 0.41.2
  - jq, sudo, ssh, etc. all present
  - container runs as `developer` (uid 1000), WORKDIR /home/developer

Relates to #658.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

@vybe vybe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Fix is correct and focused — removing the deadsnakes PPA dependency eliminates the reliability blocker. Local smoke-test verification is thorough. Suggest updating "Relates to #658" → "Closes #658" in the description so the issue auto-closes on merge, but not blocking.

@vybe
vybe merged commit 151736e into dev May 12, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants