1buildah-containers(1) General Commands Manual buildah-containers(1)
2
3
4
6 buildah-containers - List the working containers and their base images.
7
8
10 buildah containers [options]
11
12
14 Lists containers which appear to be Buildah working containers, their
15 names and IDs, and the names and IDs of the images from which they were
16 initialized.
17
18
20 --all, -a
21
22
23 List information about all containers, including those which were not
24 created by and are not being used by Buildah. Containers created by
25 Buildah are denoted with an '*' in the 'BUILDER' column.
26
27
28 --filter, -f
29
30
31 Filter output based on conditions provided.
32
33
34 Valid filters are listed below:
35
36
37 ┌─────────┬────────────────────────────┐
38 │Filter │ Description │
39 ├─────────┼────────────────────────────┤
40 │id │ [ID] Container's ID │
41 ├─────────┼────────────────────────────┤
42 │name │ [Name] Container's name │
43 ├─────────┼────────────────────────────┤
44 │ancestor │ [ImageName] Image or de‐ │
45 │ │ scendant used to create │
46 │ │ container │
47 └─────────┴────────────────────────────┘
48
49 --format
50
51
52 Pretty-print containers using a Go template.
53
54
55 Valid placeholders for the Go template are listed below:
56
57
58 ┌───────────────┬────────────────────────────┐
59 │Placeholder │ Description │
60 ├───────────────┼────────────────────────────┤
61 │.ContainerID │ Container ID │
62 ├───────────────┼────────────────────────────┤
63 │.Builder │ Whether container was cre‐ │
64 │ │ ated by buildah │
65 ├───────────────┼────────────────────────────┤
66 │.ImageID │ Image ID │
67 ├───────────────┼────────────────────────────┤
68 │.ImageName │ Image name │
69 ├───────────────┼────────────────────────────┤
70 │.ContainerName │ Container name │
71 └───────────────┴────────────────────────────┘
72
73 --json
74
75
76 Output in JSON format.
77
78
79 --noheading, -n
80
81
82 Omit the table headings from the listing of containers.
83
84
85 --notruncate
86
87
88 Do not truncate IDs and image names in the output.
89
90
91 --quiet, -q
92
93
94 Displays only the container IDs.
95
96
98 buildah containers
99
100
101 CONTAINER ID BUILDER IMAGE ID IMAGE NAME CONTAINER NAME
102 ccf84de04b80 * 53ce4390f2ad registry.access.redhat.com/ub... ubi8-working-container
103 45be1d806fc5 * 16ea53ea7c65 docker.io/library/busybox:latest busybox-working-container
104
105
106
107 buildah containers --quiet
108
109
110 ccf84de04b80c309ce6586997c79a769033dc4129db903c1882bc24a058438b8
111 45be1d806fc533fcfc2beee77e424d87e5990d3ce9214d6b374677d6630bba07
112
113
114
115 buildah containers -q --noheading --notruncate
116
117
118 ccf84de04b80c309ce6586997c79a769033dc4129db903c1882bc24a058438b8
119 45be1d806fc533fcfc2beee77e424d87e5990d3ce9214d6b374677d6630bba07
120
121
122
123 buildah containers --json
124
125
126 [
127 {
128 "id": "ccf84de04b80c309ce6586997c79a769033dc4129db903c1882bc24a058438b8",
129 "builder": true,
130 "imageid": "53ce4390f2adb1681eb1a90ec8b48c49c015e0a8d336c197637e7f65e365fa9e",
131 "imagename": "registry.access.redhat.com/ubi8:latest",
132 "containername": "ubi8-working-container"
133 },
134 {
135 "id": "45be1d806fc533fcfc2beee77e424d87e5990d3ce9214d6b374677d6630bba07",
136 "builder": true,
137 "imageid": "16ea53ea7c652456803632d67517b78a4f9075a10bfdc4fc6b7b4cbf2bc98497",
138 "imagename": "docker.io/library/busybox:latest",
139 "containername": "busybox-working-container"
140 }
141 ]
142
143
144
145 buildah containers --format "{{.ContainerID}} {{.ContainerName}}"
146
147
148 ccf84de04b80c309ce6586997c79a769033dc4129db903c1882bc24a058438b8 ubi8-working-container
149 45be1d806fc533fcfc2beee77e424d87e5990d3ce9214d6b374677d6630bba07 busybox-working-container
150
151
152
153 buildah containers --format "Container ID: {{.ContainerID}}"
154
155
156 Container ID: ccf84de04b80c309ce6586997c79a769033dc4129db903c1882bc24a058438b8
157 Container ID: 45be1d806fc533fcfc2beee77e424d87e5990d3ce9214d6b374677d6630bba07
158
159
160
161 buildah containers --filter ancestor=ubuntu
162
163
164 CONTAINER ID BUILDER IMAGE ID IMAGE NAME CONTAINER NAME
165 fbfd3505376e * 0ff04b2e7b63 docker.io/library/ubuntu:latest ubuntu-working-container
166
167
168
170 buildah(1)
171
172
173
174buildah March 2017 buildah-containers(1)