By making the build multi-stage, we get several benefits:
Independent stages can run in parallel.
Stages are separate layers which are cached.
Changes to one stage don't cause rebuilds on stages that don't depend
on it.
Only files from the final stage end up in the final image.
The tricky part is making sure every necessary thing ends up in the image.
Right now /usr and /etc are copied entirely which should cover most things.
Doing an apt remove for libgpiod and pipewire build-only dependencies will also bring the image size down.
Requirements
Before submitting your PR, please make sure you addressed the following
requirements:
[x] All commits in this PR are signed (with git commit -s), and the commit
message has max 60 characters for the summary and max 75 characters for each
description line.
[x] All added/changed functionality has a corresponding unit/integration
test.
[x] All added/changed public-facing functionality has entries in the "Upcoming
Release" section of CHANGELOG.md (if no such section exists, please create one).
[x] Any newly added unsafe code is properly documented.
Depends on #88 Obsoletes #89
Summary of the PR
The tricky part is making sure every necessary thing ends up in the image. Right now
/usr
and/etc
are copied entirely which should cover most things. Doing anapt remove
forlibgpiod
andpipewire
build-only dependencies will also bring the image size down.Requirements
Before submitting your PR, please make sure you addressed the following requirements:
git commit -s
), and the commit message has max 60 characters for the summary and max 75 characters for each description line.unsafe
code is properly documented.