Using buildah
on Fedora 30.
Links:
buildah
sits on top of:
buildah
can build images from any of:
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
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 #
$ buildah run ${fc} cat /etc/os-release
$ sc=$(buildah from scratch) $ buildah containers CONTAINER ID BUILDER IMAGE ID IMAGE NAME CONTAINER NAME 6935a1961a34 * d09302f77cfc docker.io/library/fedora:latest fedora-working-container 4dd92fc19b8a * scratch working-container $