Skip to content
Latchkey

Buildah vs docker build: Building Images in CI

Buildah builds OCI images without a daemon and supports rootless workflows; docker build is the universal default via BuildKit.

docker build (backed by BuildKit) is the standard way to build images from a Dockerfile, with advanced caching and broad tooling support. Buildah builds OCI/Docker images daemonless, supports rootless builds, can build from a Dockerfile, and also exposes scriptable, step-by-step image construction.

Buildahdocker build
Daemon requiredNoYes (or buildkitd)
RootlessStrongSupported
Dockerfile supportYes (buildah bud)Yes (native)
Scripted buildsYes (no Dockerfile needed)Dockerfile-driven
CI ecosystem supportGood, less defaultUniversal

In CI

Buildah is attractive when you want daemonless, rootless image builds - useful on locked-down runners or where running dockerd is undesirable. It builds from a Dockerfile (buildah bud) and can also construct images via scripts without one. docker build with BuildKit is the universal default with the smoothest tooling and the most documented caching patterns. For rootless/daemonless security, Buildah (often with Podman) is the natural fit; for least friction, docker build.

Choosing for pipelines

Want rootless/daemonless builds or scripted image construction: Buildah. Want the most universally supported, well-documented builder: docker build (BuildKit). Push layer cache to a registry on either to speed repeat builds.

The verdict

Rootless/daemonless or script-driven image builds: Buildah. Universal tooling and the smoothest default: docker build with BuildKit. Cache layers to a registry on either to avoid rebuilds.

Related guides

References

Run this faster and cheaper on Latchkey managed runners - self-healing included. Start free → 30-day trial · No credit card