A tool that facilitates building OCI images
Go Shell Other
Clone or download
nalind and rh-atomic-bot Avoid a stall in runCollectOutput()
Before calling runCollectOutput() to read error information from pipes,
make sure we've closed our handles to the writing ends of the pipes.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #872
Approved by: rhatdan
Latest commit 826733a Jul 19, 2018
Permalink
Failed to load latest commit information.
.github Create Buildah issue template Jan 18, 2018
bind bind/mount_unsupported.go: remove import errors Jun 26, 2018
cmd/buildah add rename command Jul 19, 2018
contrib add rename command Jul 19, 2018
demos Create Development plan Jul 4, 2018
docker Use manifest from container/image Jul 19, 2018
docs add rename command Jul 19, 2018
examples Fix wrong order of parameters Mar 12, 2018
imagebuildah build-using-dockerfile: let -t include transports again Jul 12, 2018
logos updating logo reference in README Dec 13, 2017
pkg Add a --loglevel option to build-with-dockerfile Jul 5, 2018
tests Avoid a stall in runCollectOutput() Jul 19, 2018
unshare main: if unprivileged, reexec in a user namespace Jun 28, 2018
util Fix buildah bud --layers Jun 28, 2018
vendor Vendor in latest containers/image and containers/storage Jul 19, 2018
.gitignore COPR enablement Feb 10, 2018
.papr.sh Initial ginkgo framework Feb 22, 2018
.papr.yml add optional CI test fo darwin Jul 7, 2018
.travis.yml Extend the amount of time travis_wait should wait May 24, 2018
CHANGELOG.md Update CHANGELOG.md Jul 17, 2018
CONTRIBUTING.md Fix becoming a maintainer link Jul 7, 2018
LICENSE Initial commit Jan 26, 2017
MAINTAINERS Fix becoming a maintainer link Jul 7, 2018
Makefile allow buildah cross compile for a darwin target Jul 1, 2018
README.md add rename command Jul 19, 2018
add.go Break out SetupIntermediateMountNamespace() Jun 18, 2018
btrfs_tag.sh Suss out build tags, add a missing Travis dep Jan 28, 2017
buildah.go Bump to v1.3-dev Jul 15, 2018
changelog.txt Bump to v1.2 Jul 15, 2018
commit.go commit: recognize committing to second storage locations Jun 25, 2018
common.go Use configured registries to resolve image names Dec 14, 2017
config.go Use the c/image conversion code instead of converting configs manually Jun 17, 2018
config_noseccomp.go build without seccomp Jun 26, 2018
config_seccomp.go Start using github.com/seccomp/containers-golang Jun 29, 2018
delete.go Add proper SELinux labeling to buildah run Nov 7, 2017
developmentplan.md Create Development plan Jul 4, 2018
image.go Use manifest from container/image Jul 19, 2018
import.go vendor in latest runtime-tools Jun 26, 2018
install.md Add information about the configuration files to the install docs Jun 22, 2018
libdm_tag.sh Refine the libdm_no_deferred_remove tag check Feb 2, 2017
mount.go buildah mount command should list mounts when no arguments are given. Jun 1, 2017
new.go Merge pull request #828 from baude/vendorruntimetools Jun 27, 2018
new_test.go Fix: setting the container name to the image Jan 26, 2018
ostree_tag.sh Auto-set build tags for ostree and selinux Aug 29, 2017
pull.go Fix handling of --registries-conf Jul 7, 2018
release.sh Bump to v1.1 Jun 9, 2018
run.go Avoid a stall in runCollectOutput() Jul 19, 2018
run_linux.go allow buildah cross compile for a darwin target Jul 1, 2018
run_test.go vendor in latest runtime-tools Jun 26, 2018
run_unsupport.go allow buildah cross compile for a darwin target Jul 1, 2018
selinux_tag.sh Auto-set build tags for ostree and selinux Aug 29, 2017
troubleshooting.md Add information about the configuration files to the install docs Jun 22, 2018
unmount.go Vendor in latest containers/image and containers/storage Jul 19, 2018
util.go Fix handling of --registries-conf Jul 7, 2018
vendor.conf Vendor in latest containers/image and containers/storage Jul 19, 2018

README.md

buildah logo

Buildah - a tool that facilitates building OCI container images

Go Report Card Travis

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 Demos

Changelog

Contributing

Development Plan

Installation notes

Troubleshooting Guide

Tutorials

Example

From ./examples/lighttpd.sh:

$ cat > lighttpd.sh <<"EOF"
#!/bin/bash -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
$ sudo ./lighttpd.sh

Commands

Command Description
buildah-add(1) Add the contents of a file, URL, or a directory to the container.
buildah-bud(1) Build an image using instructions from 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-inspect(1) Inspects the configuration of a container or image.
buildah-mount(1) Mount the working container's root filesystem.
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 (?)