Currently apko only constructs one layer in which all packages are squashed.
Problem
This wastes disk space as all container builds, even ones that share all but at least one package result in a layer with a different hash.
Proposed solution(s)
If we employed an algorithm like the one nix's dockerTools.buildImage uses (see https://grahamc.com/blog/nix-and-layered-docker-images/), we could avoid that inefficiency.
I also heard about https://tazj.in/blog/nixery-layers which might be worth considering.
Currently apko only constructs one layer in which all packages are squashed.
Problem
This wastes disk space as all container builds, even ones that share all but at least one package result in a layer with a different hash.
Proposed solution(s)
If we employed an algorithm like the one nix's
dockerTools.buildImageuses (see https://grahamc.com/blog/nix-and-layered-docker-images/), we could avoid that inefficiency.I also heard about https://tazj.in/blog/nixery-layers which might be worth considering.