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 │
45 │ │ descendant used to create │
46 │ │ container │
47 ├─────────┼────────────────────────────┤
48 │ │ │
49 └─────────┴────────────────────────────┘
50
51 --format
52
53
54 Pretty-print containers using a Go template.
55
56
57 Valid placeholders for the Go template are listed below:
58
59
60 ┌───────────────┬────────────────────────────┐
61 │Placeholder │ Description │
62 ├───────────────┼────────────────────────────┤
63 │.ContainerID │ Container ID │
64 ├───────────────┼────────────────────────────┤
65 │.Builder │ Whether container was cre‐ │
66 │ │ ated by buildah │
67 ├───────────────┼────────────────────────────┤
68 │.ImageID │ Image ID │
69 ├───────────────┼────────────────────────────┤
70 │.ImageName │ Image name │
71 ├───────────────┼────────────────────────────┤
72 │.ContainerName │ Container name │
73 ├───────────────┼────────────────────────────┤
74 │ │ │
75 └───────────────┴────────────────────────────┘
76
77 --json
78
79
80 Output in JSON format.
81
82
83 --noheading, -n
84
85
86 Omit the table headings from the listing of containers.
87
88
89 --notruncate
90
91
92 Do not truncate IDs and image names in the output.
93
94
95 --quiet, -q
96
97
98 Displays only the container IDs.
99
100
102 buildah containers
103
104
105 CONTAINER ID BUILDER IMAGE ID IMAGE NAME CONTAINER NAME
106 29bdb522fc62 * 3fd9065eaf02 docker.io/library/alpine:latest alpine-working-container
107 c6b04237ac8e * f9b6f7f7b9d3 docker.io/library/busybox:latest busybox-working-container
108
109
110
111 buildah containers --quiet
112
113
114 29bdb522fc62d43fca0c1a0f11cfc6dfcfed169cf6cf25f928ebca1a612ff5b0
115 c6b04237ac8e9d435ec9cf0e7eda91e302f2db9ef908418522c2d666352281eb
116
117
118
119 buildah containers -q --noheading --notruncate
120
121
122 29bdb522fc62d43fca0c1a0f11cfc6dfcfed169cf6cf25f928ebca1a612ff5b0
123 c6b04237ac8e9d435ec9cf0e7eda91e302f2db9ef908418522c2d666352281eb
124
125
126
127 buildah containers --json
128
129
130 [
131 {
132 "id": "29bdb522fc62d43fca0c1a0f11cfc6dfcfed169cf6cf25f928ebca1a612ff5b0",
133 "builder": true,
134 "imageid": "3fd9065eaf02feaf94d68376da52541925650b81698c53c6824d92ff63f98353",
135 "imagename": "docker.io/library/alpine:latest",
136 "containername": "alpine-working-container"
137 },
138 {
139 "id": "c6b04237ac8e9d435ec9cf0e7eda91e302f2db9ef908418522c2d666352281eb",
140 "builder": true,
141 "imageid": "f9b6f7f7b9d34113f66e16a9da3e921a580937aec98da344b852ca540aaa2242",
142 "imagename": "docker.io/library/busybox:latest",
143 "containername": "busybox-working-container"
144 }
145 ]
146
147
148
149 buildah containers --format "{{.ContainerID}} {{.ContainerName}}"
150
151
152 3fbeaa87e583ee7a3e6787b2d3af961ef21946a0c01a08938e4f52d53cce4c04 myalpine-working-container
153 fbfd3505376ee639c3ed50f9d32b78445cd59198a1dfcacf2e7958cda2516d5c ubuntu-working-container
154
155
156
157 buildah containers --format "Container ID: {{.ContainerID}}"
158
159
160 Container ID: 3fbeaa87e583ee7a3e6787b2d3af961ef21946a0c01a08938e4f52d53cce4c04
161 Container ID: fbfd3505376ee639c3ed50f9d32b78445cd59198a1dfcacf2e7958cda2516d5c
162
163
164
165 buildah containers --filter ancestor=ubuntu
166
167
168 CONTAINER ID BUILDER IMAGE ID IMAGE NAME CONTAINER NAME
169 fbfd3505376e * 0ff04b2e7b63 docker.io/library/ubuntu:latest ubuntu-working-container
170
171
172
174 buildah(1)
175
176
177
178buildah March 2017 buildah-containers(1)