Apko is a design philosophy and toolset for building lightweight, reproducible container images using the Alpine Linux package manager, apk. Apko’s approach focuses on composition, allowing users to build their applications once and compose them into different architectures and distributions using a tool like melange.
Apko images are built using a declarative language based on YAML, making them fully reproducible and containing auto-generated Software Bill of Materials (SBOM) files for every successful build. Apko is a composition-only tool, meaning it doesn’t build applications or components within the image, but rather assembles them from pre-built packages.
Melange is a tool used in combination with apko to manage package repositories and build environments. It is essential for resolving dependencies and creating a build environment for apko. Apko and melange are part of the open-source toolkit developed by Chainguard.
Apko images are small, fast, and contain only what’s needed by the application, following the distroless style. They are built using the apk package manager, which was introduced by Alpine Linux to address specific design requirements that could not be met by other package managers.
Apko is a command-line tool that can be used with Bazel, a popular build system, through the apko_bazelrc plugin. This allows users to build secure, minimal Wolfi-based container images using Bazel and apko.
Apko images are available in various public variants, each with different tags and package distributions. Users can check the Chainguard Images product overview and variants page for detailed information about available variants and their contents.
In summary, Apko’s design philosophy emphasizes lightweight, reproducible, and fully-contained container images using the Alpine Linux package manager, apk. It focuses on composition and works in conjunction with melange and other tools to create efficient and secure container images.