1buildah-containers(1)       General Commands Manual      buildah-containers(1)
2
3
4

NAME

6       buildah-containers - List the working containers and their base images.
7
8

SYNOPSIS

10       buildah containers [options]
11
12

DESCRIPTION

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

OPTIONS

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       ┌─────────┬────────────────────────────┐
38Filter   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       --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       ┌───────────────┬────────────────────────────┐
59Placeholder    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

EXAMPLE

98       buildah containers
99
100
101              CONTAINER ID  BUILDER  IMAGE ID     IMAGE NAME                       CONTAINER NAME
102              29bdb522fc62     *     3fd9065eaf02 docker.io/library/alpine:latest  alpine-working-container
103              c6b04237ac8e     *     f9b6f7f7b9d3 docker.io/library/busybox:latest busybox-working-container
104
105
106
107       buildah containers --quiet
108
109
110              29bdb522fc62d43fca0c1a0f11cfc6dfcfed169cf6cf25f928ebca1a612ff5b0
111              c6b04237ac8e9d435ec9cf0e7eda91e302f2db9ef908418522c2d666352281eb
112
113
114
115       buildah containers -q --noheading --notruncate
116
117
118              29bdb522fc62d43fca0c1a0f11cfc6dfcfed169cf6cf25f928ebca1a612ff5b0
119              c6b04237ac8e9d435ec9cf0e7eda91e302f2db9ef908418522c2d666352281eb
120
121
122
123       buildah containers --json
124
125
126              [
127                  {
128                      "id": "29bdb522fc62d43fca0c1a0f11cfc6dfcfed169cf6cf25f928ebca1a612ff5b0",
129                      "builder": true,
130                      "imageid": "3fd9065eaf02feaf94d68376da52541925650b81698c53c6824d92ff63f98353",
131                      "imagename": "docker.io/library/alpine:latest",
132                      "containername": "alpine-working-container"
133                  },
134                  {
135                      "id": "c6b04237ac8e9d435ec9cf0e7eda91e302f2db9ef908418522c2d666352281eb",
136                      "builder": true,
137                      "imageid": "f9b6f7f7b9d34113f66e16a9da3e921a580937aec98da344b852ca540aaa2242",
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              3fbeaa87e583ee7a3e6787b2d3af961ef21946a0c01a08938e4f52d53cce4c04 myalpine-working-container
149              fbfd3505376ee639c3ed50f9d32b78445cd59198a1dfcacf2e7958cda2516d5c ubuntu-working-container
150
151
152
153       buildah containers --format "Container ID: {{.ContainerID}}"
154
155
156              Container ID: 3fbeaa87e583ee7a3e6787b2d3af961ef21946a0c01a08938e4f52d53cce4c04
157              Container ID: fbfd3505376ee639c3ed50f9d32b78445cd59198a1dfcacf2e7958cda2516d5c
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

SEE ALSO

170       buildah(1)
171
172
173
174buildah                           March 2017             buildah-containers(1)
Impressum