summaryrefslogtreecommitdiff
path: root/docs/source/markdown
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-10-11 19:49:10 +0200
committerGitHub <noreply@github.com>2021-10-11 19:49:10 +0200
commitdd9c9172af28942cada45d7e0b63343abf863601 (patch)
tree64e8d66c20f0837892c089876af4df86c03da2c8 /docs/source/markdown
parent6f3cf534b70bb14291edb14b286f1c4981f542c1 (diff)
parent0479fd8d6a35308443bd443d5dce87f466efd79c (diff)
downloadpodman-dd9c9172af28942cada45d7e0b63343abf863601.tar.gz
podman-dd9c9172af28942cada45d7e0b63343abf863601.tar.bz2
podman-dd9c9172af28942cada45d7e0b63343abf863601.zip
Merge pull request #11889 from cevich/multiarch_docs
[CI:DOCS] Include manifest example usage
Diffstat (limited to 'docs/source/markdown')
-rw-r--r--docs/source/markdown/podman-manifest.1.md44
1 files changed, 44 insertions, 0 deletions
diff --git a/docs/source/markdown/podman-manifest.1.md b/docs/source/markdown/podman-manifest.1.md
index 6b82cc1ad..964f89afe 100644
--- a/docs/source/markdown/podman-manifest.1.md
+++ b/docs/source/markdown/podman-manifest.1.md
@@ -24,5 +24,49 @@ The `podman manifest` command provides subcommands which can be used to:
| remove | [podman-manifest-remove(1)](podman-manifest-remove.1.md) | Remove an image from a manifest list or image index. |
| rm | [podman-manifest-rme(1)](podman-manifest-rm.1.md) | Remove manifest list or image index from local storage. |
+## EXAMPLES
+
+### Building a multi-arch manifest list from a Containerfile
+
+Assuming the `Containerfile` uses `RUN` instructions, the host needs
+a way to execute non-native binaries. Configuring this is beyond
+the scope of this example. Building a multi-arch manifest list
+`shazam` in parallel across 4-threads can be done like this:
+
+ $ platarch=linux/amd64,linux/ppc64le,linux/arm64,linux/s390x
+ $ podman build --jobs=4 --platform=$platarch --manifest shazam .
+
+**Note:** The `--jobs` argument is optional, and the `-t` or `--tag`
+option should *not* be used.
+
+### Assembling a multi-arch manifest from separately built images
+
+Assuming `example.com/example/shazam:$arch` images are built separately
+on other hosts and pushed to the `example.com` registry. They may
+be combined into a manifest list, and pushed using a simple loop:
+
+ $ REPO=example.com/example/shazam
+ $ podman manifest create $REPO:latest
+ $ for IMGTAG in amd64 s390x ppc64le arm64; do \
+ podman manifest add $REPO:latest docker://$REPO:IMGTAG; \
+ done
+ $ podman manifest push --all $REPO:latest
+
+**Note:** The `add` instruction argument order is `<manifest>` then `<image>`.
+Also, the `--all` push option is required to ensure all contents are
+pushed, not just the native platform/arch.
+
+### Removing and tagging a manifest list before pushing
+
+Special care is needed when removing and pushing manifest lists, as opposed
+to the contents. You almost always want to use the `manifest rm` and
+`manifest push --all` subcommands. For example, a rename and push could
+be performed like this:
+
+ $ podman tag localhost/shazam example.com/example/shazam
+ $ podman manifest rm localhost/shazam
+ $ podman manifest push --all example.com/example/shazam
+
+
## SEE ALSO
podman(1), podman-manifest-add(1), podman-manifest-annotate(1), podman-manifest-create(1), podman-manifest-inspect(1), podman-manifest-push(1), podman-manifest-remove(1)