MCPcopy Index your code
hub / github.com/podman-container-tools/buildah

github.com/podman-container-tools/buildah @v1.44.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.44.0 ↗ · + Follow
1,453 symbols 5,527 edges 268 files 633 documented · 44% 65 cross-repo links updated 1d agov1.43.2 · 2026-06-08★ 8,912206 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

buildah logo (light) buildah logo (dark)

Buildah - a tool that facilitates building Open Container Initiative (OCI) container images

Go Report Card OpenSSF Best Practices

The Buildah package provides a command line tool that can be used to * create a working container, either from scratch or using an image as a starting point * create an image, either from a working container or via the instructions in a Dockerfile * images can be built in either the OCI image format or the traditional upstream docker image format * mount a working container's root filesystem for manipulation * unmount a working container's root filesystem * use the updated contents of a container's root filesystem as a filesystem layer to create a new image * delete a working container or an image * rename a local container

Buildah Information for Developers

For blogs, release announcements and more, please checkout the buildah.io website!

Buildah Container Images

Buildah Demos

Changelog

Contributing

Development Plan

Installation notes

Troubleshooting Guide

Tutorials

Buildah and Podman relationship

Buildah and Podman are two complementary open-source projects that are available on most Linux platforms and both projects reside at GitHub.com with Buildah here and Podman here. Both, Buildah and Podman are command line tools that work on Open Container Initiative (OCI) images and containers. The two projects differentiate in their specialization.

Buildah specializes in building OCI images. Buildah's commands replicate all of the commands that are found in a Dockerfile. This allows building images with and without Dockerfiles while not requiring any root privileges. Buildah’s ultimate goal is to provide a lower-level coreutils interface to build images. The flexibility of building images without Dockerfiles allows for the integration of other scripting languages into the build process. Buildah follows a simple fork-exec model and does not run as a daemon but it is based on a comprehensive API in golang, which can be vendored into other tools.

Podman specializes in all of the commands and functions that help you to maintain and modify OCI images, such as pulling and tagging. It also allows you to create, run, and maintain those containers created from those images. For building container images via Dockerfiles, Podman uses Buildah's golang API and can be installed independently from Buildah.

A major difference between Podman and Buildah is their concept of a container. Podman allows users to create "traditional containers" where the intent of these containers is to be long lived. While Buildah containers are really just created to allow content to be added back to the container image. An easy way to think of it is the buildah run command emulates the RUN command in a Dockerfile while the podman run command emulates the docker run command in functionality. Because of this and their underlying storage differences, you can not see Podman containers from within Buildah or vice versa.

In short, Buildah is an efficient way to create OCI images while Podman allows you to manage and maintain those images and containers in a production environment using familiar container cli commands. For more details, see the Container Tools Guide.

Example

From ./examples/lighttpd.sh:

$ cat > lighttpd.sh <<"EOF"
#!/usr/bin/env bash

set -x

ctr1=$(buildah from "${1:-fedora}")

## Get all updates and install our minimal httpd server
buildah run "$ctr1" -- dnf update -y
buildah run "$ctr1" -- dnf install -y lighttpd

## Include some buildtime annotations
buildah config --annotation "com.example.build.host=$(uname -n)" "$ctr1"

## Run our server and expose the port
buildah config --cmd "/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf" "$ctr1"
buildah config --port 80 "$ctr1"

## Commit this container to an image name
buildah commit "$ctr1" "${2:-$USER/lighttpd}"
EOF

$ chmod +x lighttpd.sh
$ ./lighttpd.sh

Commands

Command Description
buildah-add(1) Add the contents of a file, URL, or a directory to the container.
buildah-build(1) Build an image using instructions from Containerfiles or Dockerfiles.
buildah-commit(1) Create an image from a working container.
buildah-config(1) Update image configuration settings.
buildah-containers(1) List the working containers and their base images.
buildah-copy(1) Copies the contents of a file, URL, or directory into a container's working directory.
buildah-from(1) Creates a new working container, either from scratch or using a specified image as a starting point.
buildah-images(1) List images in local storage.
buildah-info(1) Display Buildah system information.
buildah-inspect(1) Inspects the configuration of a container or image.
buildah-mount(1) Mount the working container's root filesystem.
buildah-pull(1) Pull an image from the specified location.
buildah-push(1) Push an image from local storage to elsewhere.
buildah-rename(1) Rename a local container.
buildah-rm(1) Removes one or more working containers.
buildah-rmi(1) Removes one or more images.
buildah-run(1) Run a command inside of the container.
buildah-tag(1) Add an additional name to a local image.
buildah-umount(1) Unmount a working container's root file system.
buildah-unshare(1) Launch a command in a user namespace with modified ID mappings.
buildah-version(1) Display the Buildah Version Information

Future goals include: * more CI tests * additional CLI commands (?)

Extension points exported contracts — how you extend this code

BlobCache (Interface)
BlobCache is an object which saves copies of blobs that are written to it while passing them through to some real destin
pkg/blobcache/blobcache.go

Core symbols most depended-on inside this repo

Close
called by 258
digester.go
String
called by 139
run.go
Error
called by 129
internal/mkcw/attest.go
Run
called by 112
run_unix.go
Copy
called by 51
imagebuildah/stage_executor.go
Mount
called by 48
mount.go
Write
called by 40
digester.go
UsageTemplate
called by 40
cmd/buildah/common.go

Shape

Function 936
Method 297
Struct 193
TypeAlias 20
Interface 6
FuncType 1

Languages

Go100%

Modules by API surface

config.go75 symbols
copier/copier.go70 symbols
image.go48 symbols
copier/copier_test.go47 symbols
pkg/parse/parse.go45 symbols
run_common.go43 symbols
imagebuildah/stage_executor.go40 symbols
tests/testreport/testreport.go29 symbols
util/util.go27 symbols
tests/conformance/conformance_test.go27 symbols
digester.go26 symbols
pkg/cli/common.go24 symbols

Used by 2 indexed graphs manifest dependencies, hub-wide

Dependencies from manifests, versioned

cyphar.com/go-pathrsv0.2.4 · 1×
dario.cat/mergov1.0.2 · 1×
github.com/Azure/go-ansitermv0.0.0-2025010203350 · 1×
github.com/acarl005/stripansiv0.0.0-2018011610285 · 1×
github.com/aead/serpentv0.0.0-2016071414103 · 1×
github.com/clipperhouse/uax29/v2v2.7.0 · 1×
github.com/containerd/errdefsv1.0.0 · 1×

For agents

$ claude mcp add buildah \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact