Build Container Images In Kubernetes
open sourceApache-2.0self-hostablefree
kaniko builds container images from a Dockerfile inside a container or a Kubernetes pod, without a Docker daemon: it unpacks the base image's filesystem, runs each Dockerfile command in userspace, snapshots the filesystem after each one and pushes the result to a registry. Build contexts can come from a local directory or tar, standard input, a Git repository, or a GCS, S3 or Azure Blob Storage bucket, and layers can be cached in a registry. Google created kaniko and archived GoogleContainerTools/kaniko in June 2025; Chainguard, with two of its original authors, forked it to continue security patches and maintenance, with no major feature work planned. The fork publishes only source tags: the old gcr.io/kaniko-project images are no longer updated, so you build the executor image yourself or use Chainguard's commercial images.
Problems it solves
- build Docker images inside a Kubernetes pod without mounting the Docker socket
- build container images in CI without a privileged Docker-in-Docker container
- our GitLab runners on Kubernetes can't run a Docker daemon but need to build images
- build an image from a Dockerfile and push it straight to ECR, GCR or Docker Hub from a pod
- build an image from a build context stored in an S3 bucket or a Git repository
- cache image build layers in a registry so pod-based builds aren't slow
- rootless image builds in a shared cluster where privileged pods are forbidden
- the gcr.io kaniko executor image we use stopped getting updates and we need a maintained replacement
- Google archived the image builder our pipelines depend on; who maintains it now
- build images in Google Cloud Build or inside gVisor without a Docker daemon
Features
- builds images from a Dockerfile without a Docker daemon, entirely in userspace
- runs as a container or a Kubernetes pod
- build contexts from GCS, S3, Azure Blob Storage, a local directory or tar, standard input or a Git repository
- layer caching in a remote repository and base image caching with the warmer
- pushes to Docker Hub, GCR, Amazon ECR, Azure Container Registry, JFrog and other registries
- registry mirrors and registry maps
- multi-stage builds, --target and --skip-unused-stages
- reproducible builds and OCI layout output
- runs in gVisor and Google Cloud Build
Limitations
- Doesn't build Windows containers1
- Doesn't run outside the official kaniko image: copying the executor into another image, such as a Jenkins agent, isn't supported1
- No prebuilt container images or binaries from the maintained fork: build them yourself or use Chainguard's commercial kaniko images1
- No new features planned: Chainguard's fork gets security patches, maintenance and minor bug fixes only12
Capabilities
| Has a command line tool | plan not known |
|---|
Alternatives
The same job
These do what kaniko does.
- Buildah A tool that facilitates building OCI container images
- BuildKit concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit
- ko Simple, fast container image builder for Go applications
- Jib Build container images for your Java applications
- Docker Build Cloud Build container images faster on cloud builders with a shared cache, locally and in CI
- Docker Buildx Docker CLI plugin for extended build capabilities with BuildKit
