This is an old revision of the document!
Overview
Using buildah on Fedora 30.
Links:
Basics
buildah can build images from any of:
- existing images
- scratch
- Dockerfiles
Available commands:
add Add content to the container build-using-dockerfile Build an image using instructions in a Dockerfile commit Create an image from a working container config Update image configuration settings containers List working containers and their base images copy Copy content into the container from Create a working container based on an image help Help about any command images List images in local storage info Display Buildah system information inspect Inspect the configuration of a container or image mount Mount a working container's root filesystem pull Pull an image from the specified location push Push an image to a specified destination rename Rename a container rm Remove one or more working containers rmi Remove one or more images from local storage run Run a command inside of the container tag Add an additional name to a local image umount Unmount the root file system of the specified working containers unshare Run a command in a modified user namespace version Display the Buildah version information
Simple example
Delete all existing containers and check:
$ buildah rm --all $ buildah containers CONTAINER ID BUILDER IMAGE ID IMAGE NAME CONTAINER NAME $
Build from Fedora image and verify:
$ fc=$(buildah from fedora)
$ echo ${fc}
fedora-working-container
$
Run:
$ buildah run $fc bash