Buildah: Cheat Sheet
Buildah: Cheat Sheet
Buildah
This cheat sheet covers the buildah command set for the buildah tool.
QUERIES
buildah containers
list all working containers
buildah images
list all local images
buildah inspect container-id
displays details about a container
buildah inspect --type image image-id
displays details about an image
CREATING CONTAINERS
EDITING CONTAINERS
Some example ags are as follows (the full list of con guration options can be found by running buildah config -h):
--cmd command-string sets the default command run for containers created from this image
--entrypoint entrypoint-
sets the entry point for containers created from this image
string
--port port adds a port to be exposed by this image’s containers
DELETING CONTAINERS
buildah rm container-id
deletes the given container; multiple container IDs may be speci ed, separated by spaces
buildah rm --all
delete all containers
DELETING IMAGES
SCRATCH CONTAINERS
Once a scatch container has been initialized, the commands under "Editing Containers" can also be used to manipulate them. The following commands are
used to establish the set of required packages on the scratch image.
USING DOCKERFILES