Kong builds Distroless image with Wolfi’s apko declarative build system. It uses a hybrid model: Declarative base system (apko) + controlled runtime compatibility layering.
**Declarative Base Layer (apko)**
Defined in apko.yaml, the base includes only what's required to run Kong - the glibc runtime, CA certificates, and core runtime libraries. There is no shell and no package manager.
**Runtime Compatibility Layer**
A controlled compatibility layer for compiled plugin dependencies, specifically aligned `libstdc++/libgcc` runtime libraries, are added at build time but not at runtime. This ensures ABI compatibility without adding packages that drift over time.
**Permissions and Runtime Initialization**
All file system permissions, user mappings, and runtime directory structures are pre-configured at build time, consistent with existing Kong operational behavior.
The key difference from traditional images: nothing is installed at runtime. The container is immutable once deployed.