Skip to content

feature: smart layer construction for better layer caching #2173

@lucascherzer

Description

@lucascherzer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions