1buildah-manifest(1) General Commands Manual buildah-manifest(1)
2
3
4
6 buildah-manifest - Create and manipulate manifest lists and image in‐
7 dexes.
8
9
11 buildah manifest COMMAND [OPTIONS] [ARG...]
12
13
15 The buildah manifest command provides subcommands which can be used to:
16
17
18 * Create a working Docker manifest list or OCI image index.
19 * Add an entry to a manifest list or image index for a specified image.
20 * Add or update information about an entry in a manifest list or image index.
21 * Delete a working container or an image.
22 * Push a manifest list or image index to a registry or other location.
23
24
25
27 ┌─────────┬──────────────────────────────┬─────────────────────┐
28 │Command │ Man Page │ Description │
29 ├─────────┼──────────────────────────────┼─────────────────────┤
30 │add │ buildah-manifest-add(1) │ Add an image to a │
31 │ │ │ manifest list or │
32 │ │ │ image index. │
33 ├─────────┼──────────────────────────────┼─────────────────────┤
34 │annotate │ buildah-manifest-annotate(1) │ Add or update in‐ │
35 │ │ │ formation about an │
36 │ │ │ image in a manifest │
37 │ │ │ list or image in‐ │
38 │ │ │ dex. │
39 ├─────────┼──────────────────────────────┼─────────────────────┤
40 │create │ buildah-manifest-create(1) │ Create a manifest │
41 │ │ │ list or image in‐ │
42 │ │ │ dex. │
43 ├─────────┼──────────────────────────────┼─────────────────────┤
44 │inspect │ buildah-manifest-inspect(1) │ Display the con‐ │
45 │ │ │ tents of a manifest │
46 │ │ │ list or image in‐ │
47 │ │ │ dex. │
48 ├─────────┼──────────────────────────────┼─────────────────────┤
49 │push │ buildah-manifest-push(1) │ Push a manifest │
50 │ │ │ list or image index │
51 │ │ │ to a registry or │
52 │ │ │ other location. │
53 ├─────────┼──────────────────────────────┼─────────────────────┤
54 │remove │ buildah-manifest-remove(1) │ Remove an image │
55 │ │ │ from a manifest │
56 │ │ │ list or image in‐ │
57 │ │ │ dex. │
58 ├─────────┼──────────────────────────────┼─────────────────────┤
59 │rm │ buildah-manifest-rm(1) │ Remove manifest │
60 │ │ │ list from local │
61 │ │ │ storage. │
62 └─────────┴──────────────────────────────┴─────────────────────┘
63
65 Building a multi-arch manifest list from a Containerfile
66 Assuming the Containerfile uses RUN instructions, the host needs a way
67 to execute non-native binaries. Configuring this is beyond the scope
68 of this example. Building a multi-arch manifest list shazam in paral‐
69 lel across 4-threads can be done like this:
70
71
72 $ platarch=linux/amd64,linux/ppc64le,linux/arm64,linux/s390x
73 $ buildah build --jobs=4 --platform=$platarch --manifest shazam .
74
75
76
77 Note: The --jobs argument is optional, and the -t or --tag option
78 should not be used.
79
80
81 Assembling a multi-arch manifest from separately built images
82 Assuming example.com/example/shazam:$arch images are built separately
83 on other hosts and pushed to the example.com registry. They may be
84 combined into a manifest list, and pushed using a simple loop:
85
86
87 $ REPO=example.com/example/shazam
88 $ buildah manifest create $REPO:latest
89 $ for IMGTAG in amd64 s390x ppc64le arm64; do
90 buildah manifest add $REPO:latest docker://$REPO:IMGTAG;
91 done
92 $ buildah manifest push --all $REPO:latest
93
94
95
96 Note: The add instruction argument order is <manifest> then <image>.
97 Also, the --all push option is required to ensure all contents are
98 pushed, not just the native platform/arch.
99
100
101 Removing and tagging a manifest list before pushing
102 Special care is needed when removing and pushing manifest lists, as op‐
103 posed to the contents. You almost always want to use the manifest rm
104 and manifest push --all subcommands. For example, a rename and push
105 could be performed like this:
106
107
108 $ buildah tag localhost/shazam example.com/example/shazam
109 $ buildah manifest rm localhost/shazam
110 $ buildah manifest push --all example.com/example/shazam
111
112
113
115 buildah(1), buildah-manifest-create(1), buildah-manifest-add(1), buil‐
116 dah-manifest-remove(1), buildah-manifest-annotate(1), buildah-manifest-
117 inspect(1), buildah-manifest-push(1), buildah-manifest-rm(1)
118
119
120
121buildah September 2019 buildah-manifest(1)