Skip to content

refactor(docker): drop build-essential from apt install (#27507)#33028

Merged
benbarclay merged 1 commit into
mainfrom
salvage-27507-drop-build-essential
May 27, 2026
Merged

refactor(docker): drop build-essential from apt install (#27507)#33028
benbarclay merged 1 commit into
mainfrom
salvage-27507-drop-build-essential

Conversation

@benbarclay

Copy link
Copy Markdown
Collaborator

Salvages #27507 (@emonty).

Drops build-essential from the apt install line. The Dockerfile already
installs gcc + python3-dev + libffi-dev explicitly, which covers the C-ext
compile paths lazy_deps may hit at first boot. g++, make, and dpkg-dev
(the rest of what build-essential pulls in) aren't reached by the resolved
[all] + [messaging] dependency tree on current main.

Validation

Built both variants --no-cache against current origin/main (81a4f280d)
and ran the same smoke battery on each.

Image size

size layers
baseline (origin/main) 3,272,362,571 B (3.05 GiB) 25
salvage (this PR) 3,206,599,975 B (2.99 GiB) 25
delta 63 MiB (-2.01%) 0

Smoke tests (identical on both images)

  • hermes --versionHermes Agent v0.14.0 (2026.5.16)
  • hermes_cli imports cleanly inside the venv
  • _tui_need_npm_install() returns False (no runtime npm reinstall)
  • hermes --tui non-interactive path → clean no-TTY exit
  • tools.lazy_deps imports (runtime ext-install path intact)
  • gcc --versiongcc (Debian 14.2.0-19) 14.2.0 (still present)

The only behavioral delta between the two images is make no longer
present in the salvage. make wasn't used by any current
Dockerfile/.dockerignore/build step or by any sdist in the resolved
[all] + [messaging] dependency tree (verified via uv sync --frozen --dry-run).

Trade-off

This reduces the runtime safety margin for lazy_deps. If a future
optional extra (a user's lazy-installed package) ever pulls an sdist that
needs make or g++ at first-use, the install would fail with
/bin/sh: make: not found. Today none of the lazy-install candidates in
tools/lazy_deps.py hit that path, but worth noting if the universe of
lazy-installable packages broadens.

Authorship

Original change by @emonty in #27507. Their branch was on a pre-s6-overlay
base and the cherry-pick conflicted with a much larger commit that
reverted s6-overlay → tini; reconstructed just the stated build-essential
removal against current main and preserved attribution via
Co-authored-by:.

Closes #27507.

build-essential is a Debian metapackage (libc6-dev + gcc + g++ + make + dpkg-dev).
The Dockerfile already installs gcc + python3-dev + libffi-dev explicitly,
which covers the C-ext compile cases lazy_deps may hit at first boot.
g++/make/dpkg-dev aren't reached by the resolved [all]+[messaging] tree
on current main — verified via uv sync --dry-run on cp313-linux.

Co-authored-by: Monty Taylor <mordred@inaugust.com>
@benbarclay benbarclay added the area/docker Docker image, Compose, packaging label May 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: salvage-27507-drop-build-essential vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 9400 on HEAD, 9400 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 4973 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@benbarclay benbarclay merged commit 1e5884e into main May 27, 2026
22 of 23 checks passed
@benbarclay benbarclay deleted the salvage-27507-drop-build-essential branch May 27, 2026 04:35
@alt-glitch alt-glitch added type/refactor Code restructuring, no behavior change P3 Low — cosmetic, nice to have labels May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docker Docker image, Compose, packaging P3 Low — cosmetic, nice to have type/refactor Code restructuring, no behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants