Repository navigation
Order the image build around the Wine prefix - #16
Merged
Merged
Conversation
The most expensive layer is build-prefix.sh: wineboot, DXVK, VKD3D, then downloading the proprietary TPV installer and driving Inno Setup under Xvfb with a 900 s timeout. The QZ binary and the whole scripts/ directory were copied in above it, so editing any script -- or bumping QZ_COMMIT -- re-ran all of that. Copy only the two scripts the prefix build needs before it, and move the QZ binary and the rest of scripts/ after it. The image is unchanged; only the layer order moves. A one-line edit to entrypoint.sh now rebuilds in 3 s instead of 67 s, with the prefix layer reading 'Using cache' rather than reinstalling TPV. Also drop packages nothing uses: gnupg (26 packages; trixie's apt verifies the signed-by WineHQ key through Sequoia, confirmed with neither gnupg nor gpgv installed), vulkan-tools and cabextract (both referenced nowhere), and tar (already Essential). curl stays -- the entrypoint re-downloads the installer at runtime -- and so do zstd, for the VKD3D tarball, and procps. Collapse the three apt-get update runs into one by adding the WineHQ and Mesa repositories before it. Full build 438 s to 385 s, image 6.69 GB to 6.63 GB. See docs/adr/0008.
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.
The most expensive layer in
Containerfile.fullisRUN /opt/scripts/build-prefix.sh—wineboot, DXVK, VKD3D, then downloading the proprietary TPV installer and driving Inno Setup under Xvfb with a 900 s timeout.Two things sat above it and invalidated it:
COPY --from=qzbuild(QZ binary)COPY scripts/RUN build-prefix.shSo editing any script, or bumping
QZ_COMMIT, re-ran the whole Wine prefix build. Measured on a one-line edit toscripts/entrypoint.sh, the log shows it really happening:Now only
build-prefix.shandxvfb-lib.share copied before it; the QZ binary and the rest ofscripts/follow it. The image is unchanged — only the layer order moves.Measured
Using cacheBoth full builds ran with only 3 and 5 cached layers, so that comparison isn't a warm-cache artefact.
Packages
Removed, after checking every script for the binaries it invokes:
gnupg(7.1 MB, 26 packages — trixie's apt verifies thesigned-byWineHQ key through Sequoia; confirmedapt-get updateresolveswinehq-stablewith neithergnupgnorgpgvinstalled),vulkan-toolsandcabextract(referenced nowhere),tar(already Essential, installed nothing).Kept deliberately:
curl, becauseentrypoint.shre-downloads the installer at runtime when the launcher is missing;zstdfor the VKD3D tarball;procpson suspicion rather than evidence.Also collapsed the three
apt-get updateruns into one.Not in this PR
The two larger size levers need a real ride to validate, so they stay separable: dropping i386 multiarch (77 MB of downloads — it is enabled for the PE32 installer, a build-time need, but if any 32-bit code runs at runtime the ride breaks) and
debian:trixie-slim(43 MB).Reasoning in full:
docs/adr/0008-order-the-image-build-around-the-wine-prefix.md.