AIGEN Use BuildKit cache mounts for package manager caches #1087
+49
−39
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.
Summary
apt-get clean,npm cache clean,pip cache purge,rm -rf ~/.gradle) with BuildKit--mount=type=cache--no-install-recommendsto all apt-get install callsca-certificatesexplicitly for HTTPS apt repos (needed with--no-install-recommends)npmexplicitly alongsidenodejs(recommended dep, skipped with--no-install-recommends)Files changed
skiplang/Dockerfile— apt cache mountssql/Dockerfile— apt, npm, SDKMAN cache mountsDockerfile— apt, npm, pip cache mountssql/server/core/Dockerfile— Gradle cache mountsql/server/dev/Dockerfile— Gradle cache mountskipruntime-ts/tests/native_addon/Dockerfile— apt, npm cache mountsskipruntime-ts/tests/native_addon_unreleased/Dockerfile— apt, npm cache mountsMeasured impact (skiplang/Dockerfile base stage)
apt-get cleanNotes
--mount=type=cacherequires BuildKit (default since Docker 23.0, Jan 2023)release_docker.shalready usesdocker buildx build(full BuildKit)--no-cacheflag in build scripts disables layer caching but does NOT affect cache mount volumessharing=lockedprevents cache corruption during parallel buildsTest plan
docker build --no-cache -f skiplang/Dockerfile --target base .— builds successfullyclang --version— LLVM 20.1.8 works/var/lib/apt/lists/)🤖 Generated with Claude Code