buildah-containers(1)
π buildah-containers(1) π
okay bestie, listen up β this is the manual page for buildah-containers, part of the buildah fam. it lives in the General Commands Manual section, and honestly? it's giving "let me just show you what's in my closet" energy. we're gonna get you fluent, no cap.
β¨ NAME β¨
buildah-containers β list the working containers and their base images. that's it. that's the whole vibe. π
β¨ SYNOPSIS β¨
buildah containers [options]
β¨ DESCRIPTION β¨
okay so this one is SO straightforward and i love that for it. it lists containers which appear to be Buildah working containers, along with their names and IDs, and then β the bestie part β it also shows you the names and IDs of the images from which they were initialized. so you get the container AND its origin story. main character and backstory, periodt. π¦
β¨ OPTIONS β¨
--all,-aβ list info about all containers, even the ones that were not created by Buildah and aren't being used by Buildah. how do you tell them apart? containers created by Buildah get an'*'in the'BUILDER'column. cute lil star, iykyk β--filter,-fβ filter the output based on conditions you provide. yes queen, narrow it down. π
here are the valid filters, pls memorize:
idβ[ID]Container's IDnameβ[Name]Container's nameancestorβ[ImageName]Image or descendant used to create container
--formatβ pretty-print containers using a Go template. so you can make it look exactly how you want it to look, obsessed. πΈ
valid placeholders for the Go template are listed below:
.ContainerIDβ Container ID.Builderβ Whether container was created by buildah.ImageIDβ Image ID.ImageNameβ Image name.ContainerNameβ Container name
--jsonβ output in JSON format. for the data girlies. π₯--noheading,-nβ omit the table headings from the listing of containers. bye bye headers π--notruncateβ do not truncate IDs and image names in the output. no more lil...cutting your faves off mid-name, we hate to see it. π--quiet,-qβ displays only the container IDs. minimal. clean. iconic. π
β¨ EXAMPLE β¨
okay bestie here's where it gets fun, watch:
buildah containers
CONTAINER ID BUILDER IMAGE ID IMAGE NAME CONTAINER NAME
ccf84de04b80 * 53ce4390f2ad registry.access.redhat.com/ub... ubi8-working-container
45be1d806fc5 * 16ea53ea7c65 docker.io/library/busybox:latest busybox-working-container
see those lil stars in the BUILDER column? yeah. buildah babies. π«Ά
now let's go quiet mode:
buildah containers --quiet
ccf84de04b80c309ce6586997c79a769033dc4129db903c1882bc24a058438b8
45be1d806fc533fcfc2beee77e424d87e5990d3ce9214d6b374677d6630bba07
and stacking flags like the pro you are:
buildah containers -q --noheading --notruncate
ccf84de04b80c309ce6586997c79a769033dc4129db903c1882bc24a058438b8
45be1d806fc533fcfc2beee77e424d87e5990d3ce9214d6b374677d6630bba07
json girlies rise up:
buildah containers --json
[
{
"id": "ccf84de04b80c309ce6586997c79a769033dc4129db903c1882bc24a058438b8",
"builder": true,
"imageid": "53ce4390f2adb1681eb1a90ec8b48c49c015e0a8d336c197637e7f65e365fa9e",
"imagename": "registry.access.redhat.com/ubi8:latest",
"containername": "ubi8-working-container"
},
{
"id": "45be1d806fc533fcfc2beee77e424d87e5990d3ce9214d6b374677d6630bba07",
"builder": true,
"imageid": "16ea53ea7c652456803632d67517b78a4f9075a10bfdc4fc6b7b4cbf2bc98497",
"imagename": "docker.io/library/busybox:latest",
"containername": "busybox-working-container"
}
]
templates!! make it yours π
buildah containers --format "{{.ContainerID}} {{.ContainerName}}"
ccf84de04b80c309ce6586997c79a769033dc4129db903c1882bc24a058438b8 ubi8-working-container
45be1d806fc533fcfc2beee77e424d87e5990d3ce9214d6b374677d6630bba07 busybox-working-container
and if you want a lil label on it:
buildah containers --format "Container ID: {{.ContainerID}}"
Container ID: ccf84de04b80c309ce6586997c79a769033dc4129db903c1882bc24a058438b8
Container ID: 45be1d806fc533fcfc2beee77e424d87e5990d3ce9214d6b374677d6630bba07
now filter by ancestor, chef's kiss:
buildah containers --filter ancestor=ubuntu
CONTAINER ID BUILDER IMAGE ID IMAGE NAME CONTAINER NAME
fbfd3505376e * 0ff04b2e7b63 docker.io/library/ubuntu:latest ubuntu-working-container
β¨ SEE ALSO β¨
buildah(1)β go read the parent page too, it's the whole ecosystem bestie π
and that's the tea, bestie. this page comes from the buildah manual, dated March 2017 π β yes she's been serving since 2017 and she has not missed a day. go list those containers, you got this. πβ¨
π¦ where this page comes from
- centos-stream 10: buildah 2:1.45.0-2.el10 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- centos-stream 9: buildah 2:1.43.2-3.el9 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- debian trixie: buildah 1.39.3+ds1-1+b7 Β· Apache-2.0
- fedora 43: buildah 2:1.41.5-1.fc43 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- fedora 43: buildah 2:1.43.2-1.fc43
- fedora 43: buildah 2:1.43.4-1.fc43
- fedora 43: buildah 2:1.43.5-1.fc43 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- fedora 44: buildah 2:1.43.0-1.fc44 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- fedora 44: buildah 2:1.43.4-1.fc44
- fedora 44: buildah 2:1.43.5-1.fc44 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- opensuse-leap 16.0: buildah 1.39.5-160000.2.1 Β· Apache-2.0
- opensuse-leap 16.0: buildah 1.39.5-160000.2.1 Β· Apache-2.0
- opensuse-leap 16.0: buildah 1.39.5-160000.2.1 Β· Apache-2.0
- opensuse-leap 16.0: buildah 1.39.5-160000.2.1 Β· Apache-2.0
- ubuntu questing: buildah 1.39.3+ds1-1syncable1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms