refactor(docker): drop build-essential from apt install (#27507)#33028
Merged
Conversation
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>
Contributor
🔎 Lint report:
|
19 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Salvages #27507 (@emonty).
Drops
build-essentialfrom the apt install line. The Dockerfile alreadyinstalls
gcc + python3-dev + libffi-devexplicitly, which covers the C-extcompile paths
lazy_depsmay hit at first boot.g++,make, anddpkg-dev(the rest of what
build-essentialpulls in) aren't reached by the resolved[all] + [messaging]dependency tree on currentmain.Validation
Built both variants
--no-cacheagainst currentorigin/main(81a4f280d)and ran the same smoke battery on each.
Image size
origin/main)Smoke tests (identical on both images)
hermes --version→Hermes Agent v0.14.0 (2026.5.16)hermes_cliimports cleanly inside the venv_tui_need_npm_install()returnsFalse(no runtime npm reinstall)hermes --tuinon-interactive path → clean no-TTY exittools.lazy_depsimports (runtime ext-install path intact)gcc --version→gcc (Debian 14.2.0-19) 14.2.0(still present)The only behavioral delta between the two images is
makeno longerpresent in the salvage.
makewasn't used by any currentDockerfile/.dockerignore/build step or by any sdist in the resolved[all] + [messaging]dependency tree (verified viauv sync --frozen --dry-run).Trade-off
This reduces the runtime safety margin for
lazy_deps. If a futureoptional extra (a user's lazy-installed package) ever pulls an sdist that
needs
makeorg++at first-use, the install would fail with/bin/sh: make: not found. Today none of the lazy-install candidates intools/lazy_deps.pyhit that path, but worth noting if the universe oflazy-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-essentialremoval against current
mainand preserved attribution viaCo-authored-by:.Closes #27507.