talira

A tool that facilitates building OCI container images

open sourceApache-2.0self-hostablefree

Buildah builds OCI and Docker-format container images, from a Containerfile or Dockerfile with buildah build, or step by step from scratch or an existing image with commands that create a working container, mount its root filesystem, run commands in it and commit it as an image. It runs without a daemon, in a fork-exec model, and can build without root privileges, which makes it usable in unprivileged CI and inside Kubernetes pods without Docker-in-Docker. Podman uses Buildah's Go API for its own builds, though the two keep separate container stores. It's part of Podman Container Tools, a CNCF Sandbox project, and is Apache-2.0.

Problems it solves

  • build container images in CI without a Docker daemon or Docker-in-Docker
  • build images inside a Kubernetes pod without giving it root or the host's Docker socket
  • build an image from a Dockerfile as a normal user without root privileges
  • build a minimal image from scratch with shell commands, without writing a Dockerfile
  • mount a container image's filesystem and copy files into it with my host's tools
  • script image builds step by step in bash so each step can use my own logic
  • produce both OCI and Docker-format images from the same build

Features

  • builds from Containerfiles or Dockerfiles (buildah build)
  • working containers from scratch or an existing image
  • mount and unmount a container's root filesystem
  • commit a working container to an image; rename and delete containers
  • OCI or Docker image formats
  • no daemon (fork-exec model); rootless builds
  • Go library that Podman uses for Dockerfile builds
  • packaged for Fedora, RHEL, CentOS, Debian, Ubuntu, Arch, Gentoo and openSUSE

Limitations

  • Doesn't see Podman's containers: Buildah's working containers and Podman's are stored separately and can't see each other1

Capabilities

Has a command line toolplan not known
Has official SDKsplan not known

Alternatives

The same job

These do what Buildah does.

  1. BuildKit concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit
  2. ko Simple, fast container image builder for Go applications
  3. Jib Build container images for your Java applications
  4. Docker Buildx Docker CLI plugin for extended build capabilities with BuildKit
  5. kaniko Build Container Images In Kubernetes
  6. Docker Build Cloud Build container images faster on cloud builders with a shared cache, locally and in CI

Compare Buildah with the top 3