$ account ko-build
ko is a CLI tool for building container images from Go source code. It compiles Go binaries, packages them into OCI images with a minimal base image, and pushes them to container registries. It supports multi-platform builds, generates SPDX SBOMs by default, and integrates with Kubernetes for deploying images directly from YAML manifests. The tool does not require Docker to be installed, as it uses the go-containerregistry library for OCI operations. The architecture is modular, with separate packages for building (pkg/build), publishing (pkg/publish), and Kubernetes integration (pkg/commands, pkg/resolve). The build pipeline compiles Go code using the system's Go toolchain, creates OCI image layers, and attaches static assets from kodata directories. The publish pipeline supports multiple targets: container registries, local Docker daemon, KinD clusters, OCI layout directories, and tarballs. Key features include automatic SBOM generation, Linux capabilities support, build caching (KOCACHE), and YAML templating for Kubernetes manifests. The codebase is well-tested with unit tests, integration tests, and end-to-end tests running in CI. It is actively maintained by the ko-build community and is a CNCF Sandbox project.