summaryrefslogtreecommitdiff
path: root/devdocs/docker/engine%2Freference%2Fcommandline%2Fmanifest%2Findex.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/docker/engine%2Freference%2Fcommandline%2Fmanifest%2Findex.html
new repository
Diffstat (limited to 'devdocs/docker/engine%2Freference%2Fcommandline%2Fmanifest%2Findex.html')
-rw-r--r--devdocs/docker/engine%2Freference%2Fcommandline%2Fmanifest%2Findex.html154
1 files changed, 154 insertions, 0 deletions
diff --git a/devdocs/docker/engine%2Freference%2Fcommandline%2Fmanifest%2Findex.html b/devdocs/docker/engine%2Freference%2Fcommandline%2Fmanifest%2Findex.html
new file mode 100644
index 00000000..5ba7db4a
--- /dev/null
+++ b/devdocs/docker/engine%2Freference%2Fcommandline%2Fmanifest%2Findex.html
@@ -0,0 +1,154 @@
+<h1>docker manifest</h1> <p><br></p> <p>Manage Docker image manifests and manifest lists</p> <blockquote class="important"> <p>This command is experimental.</p> <p><a href="../cli/index#experimental-features">Experimental features</a> are intended for testing and feedback as their functionality or UX may change between releases without warning or can be removed entirely in a future release.</p> </blockquote> <h2 id="usage">Usage</h2> <div class="highlight"><pre class="highlight" data-language="">$ docker manifest COMMAND COMMAND
+</pre></div> <h2 id="description">Description</h2> <p name="extended-description">The <code class="language-plaintext highlighter-rouge">docker manifest</code> command by itself performs no action. In order to operate on a manifest or manifest list, one of the subcommands must be used.</p> <p>A single manifest is information about an image, such as layers, size, and digest. The docker manifest command also gives users additional information such as the os and architecture an image was built for.</p> <p>A manifest list is a list of image layers that is created by specifying one or more (ideally more than one) image names. It can then be used in the same way as an image name in <code class="language-plaintext highlighter-rouge">docker pull</code> and <code class="language-plaintext highlighter-rouge">docker run</code> commands, for example.</p> <p>Ideally a manifest list is created from images that are identical in function for different os/arch combinations. For this reason, manifest lists are often referred to as “multi-arch images”. However, a user could create a manifest list that points to two images -- one for windows on amd64, and one for darwin on amd64.</p> <h3 id="manifest-inspect">manifest inspect</h3> <div class="highlight"><pre class="highlight" data-language="">$ docker manifest inspect --help
+
+Usage: docker manifest inspect [OPTIONS] [MANIFEST_LIST] MANIFEST
+
+Display an image manifest, or manifest list
+
+Options:
+ --help Print usage
+ --insecure Allow communication with an insecure registry
+ -v, --verbose Output additional info including layers and platform
+</pre></div> <h3 id="manifest-create">manifest create</h3> <div class="highlight"><pre class="highlight" data-language="">Usage: docker manifest create MANIFEST_LIST MANIFEST [MANIFEST...]
+
+Create a local manifest list for annotating and pushing to a registry
+
+Options:
+ -a, --amend Amend an existing manifest list
+ --insecure Allow communication with an insecure registry
+ --help Print usage
+</pre></div> <h3 id="manifest-annotate">manifest annotate</h3> <div class="highlight"><pre class="highlight" data-language="">Usage: docker manifest annotate [OPTIONS] MANIFEST_LIST MANIFEST
+
+Add additional information to a local image manifest
+
+Options:
+ --arch string Set architecture
+ --help Print usage
+ --os string Set operating system
+ --os-version string Set operating system version
+ --os-features stringSlice Set operating system feature
+ --variant string Set architecture variant
+
+</pre></div> <h3 id="manifest-push">manifest push</h3> <div class="highlight"><pre class="highlight" data-language="">Usage: docker manifest push [OPTIONS] MANIFEST_LIST
+
+Push a manifest list to a repository
+
+Options:
+ --help Print usage
+ --insecure Allow push to an insecure registry
+ -p, --purge Remove the local manifest list after push
+</pre></div> <h3 id="working-with-insecure-registries">Working with insecure registries</h3> <p>The manifest command interacts solely with a Docker registry. Because of this, it has no way to query the engine for the list of allowed insecure registries. To allow the CLI to interact with an insecure registry, some <code class="language-plaintext highlighter-rouge">docker manifest</code> commands have an <code class="language-plaintext highlighter-rouge">--insecure</code> flag. For each transaction, such as a <code class="language-plaintext highlighter-rouge">create</code>, which queries a registry, the <code class="language-plaintext highlighter-rouge">--insecure</code> flag must be specified. This flag tells the CLI that this registry call may ignore security concerns like missing or self-signed certificates. Likewise, on a <code class="language-plaintext highlighter-rouge">manifest push</code> to an insecure registry, the <code class="language-plaintext highlighter-rouge">--insecure</code> flag must be specified. If this is not used with an insecure registry, the manifest command fails to find a registry that meets the default requirements.</p> <p>For example uses of this command, refer to the <a href="#examples">examples section</a> below.</p> <h2 id="examples">Examples</h2> <h3 id="inspect-an-images-manifest-object">Inspect an image’s manifest object</h3> <div class="highlight"><pre class="highlight" data-language="">$ docker manifest inspect hello-world
+{
+ "schemaVersion": 2,
+ "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
+ "config": {
+ "mediaType": "application/vnd.docker.container.image.v1+json",
+ "size": 1520,
+ "digest": "sha256:1815c82652c03bfd8644afda26fb184f2ed891d921b20a0703b46768f9755c57"
+ },
+ "layers": [
+ {
+ "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
+ "size": 972,
+ "digest": "sha256:b04784fba78d739b526e27edc02a5a8cd07b1052e9283f5fc155828f4b614c28"
+ }
+ ]
+}
+</pre></div> <h3 id="inspect-an-images-manifest-and-get-the-osarch-info">Inspect an image’s manifest and get the os/arch info</h3> <p>The <code class="language-plaintext highlighter-rouge">docker manifest inspect</code> command takes an optional <code class="language-plaintext highlighter-rouge">--verbose</code> flag that gives you the image’s name (Ref), and architecture and os (Platform).</p> <p>Just as with other docker commands that take image names, you can refer to an image with or without a tag, or by digest (e.g. <code class="language-plaintext highlighter-rouge">hello-world@sha256:f3b3b28a45160805bb16542c9531888519430e9e6d6ffc09d72261b0d26ff74f</code>).</p> <p>Here is an example of inspecting an image’s manifest with the <code class="language-plaintext highlighter-rouge">--verbose</code> flag:</p> <div class="highlight"><pre class="highlight" data-language="">$ docker manifest inspect --verbose hello-world
+{
+ "Ref": "docker.io/library/hello-world:latest",
+ "Digest": "sha256:f3b3b28a45160805bb16542c9531888519430e9e6d6ffc09d72261b0d26ff74f",
+ "SchemaV2Manifest": {
+ "schemaVersion": 2,
+ "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
+ "config": {
+ "mediaType": "application/vnd.docker.container.image.v1+json",
+ "size": 1520,
+ "digest": "sha256:1815c82652c03bfd8644afda26fb184f2ed891d921b20a0703b46768f9755c57"
+ },
+ "layers": [
+ {
+ "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
+ "size": 972,
+ "digest": "sha256:b04784fba78d739b526e27edc02a5a8cd07b1052e9283f5fc155828f4b614c28"
+ }
+ ]
+ },
+ "Platform": {
+ "architecture": "amd64",
+ "os": "linux"
+ }
+}
+</pre></div> <h3 id="create-and-push-a-manifest-list">Create and push a manifest list</h3> <p>To create a manifest list, you first <code class="language-plaintext highlighter-rouge">create</code> the manifest list locally by specifying the constituent images you would like to have included in your manifest list. Keep in mind that this is pushed to a registry, so if you want to push to a registry other than the docker registry, you need to create your manifest list with the registry name or IP and port. This is similar to tagging an image and pushing it to a foreign registry.</p> <p>After you have created your local copy of the manifest list, you may optionally <code class="language-plaintext highlighter-rouge">annotate</code> it. Annotations allowed are the architecture and operating system (overriding the image’s current values), os features, and an architecture variant.</p> <p>Finally, you need to <code class="language-plaintext highlighter-rouge">push</code> your manifest list to the desired registry. Below are descriptions of these three commands, and an example putting them all together.</p> <div class="highlight"><pre class="highlight" data-language="">$ docker manifest create 45.55.81.106:5000/coolapp:v1 \
+ 45.55.81.106:5000/coolapp-ppc64le-linux:v1 \
+ 45.55.81.106:5000/coolapp-arm-linux:v1 \
+ 45.55.81.106:5000/coolapp-amd64-linux:v1 \
+ 45.55.81.106:5000/coolapp-amd64-windows:v1
+
+Created manifest list 45.55.81.106:5000/coolapp:v1
+</pre></div> <div class="highlight"><pre class="highlight" data-language="">$ docker manifest annotate 45.55.81.106:5000/coolapp:v1 45.55.81.106:5000/coolapp-arm-linux --arch arm
+</pre></div> <div class="highlight"><pre class="highlight" data-language="">$ docker manifest push 45.55.81.106:5000/coolapp:v1
+Pushed manifest 45.55.81.106:5000/coolapp@sha256:9701edc932223a66e49dd6c894a11db8c2cf4eccd1414f1ec105a623bf16b426 with digest: sha256:f67dcc5fc786f04f0743abfe0ee5dae9bd8caf8efa6c8144f7f2a43889dc513b
+Pushed manifest 45.55.81.106:5000/coolapp@sha256:f3b3b28a45160805bb16542c9531888519430e9e6d6ffc09d72261b0d26ff74f with digest: sha256:b64ca0b60356a30971f098c92200b1271257f100a55b351e6bbe985638352f3a
+Pushed manifest 45.55.81.106:5000/coolapp@sha256:39dc41c658cf25f33681a41310372f02728925a54aac3598310bfb1770615fc9 with digest: sha256:df436846483aff62bad830b730a0d3b77731bcf98ba5e470a8bbb8e9e346e4e8
+Pushed manifest 45.55.81.106:5000/coolapp@sha256:f91b1145cd4ac800b28122313ae9e88ac340bb3f1e3a4cd3e59a3648650f3275 with digest: sha256:5bb8e50aa2edd408bdf3ddf61efb7338ff34a07b762992c9432f1c02fc0e5e62
+sha256:050b213d49d7673ba35014f21454c573dcbec75254a08f4a7c34f66a47c06aba
+
+</pre></div> <h3 id="inspect-a-manifest-list">Inspect a manifest list</h3> <div class="highlight"><pre class="highlight" data-language="">$ docker manifest inspect coolapp:v1
+{
+ "schemaVersion": 2,
+ "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
+ "manifests": [
+ {
+ "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
+ "size": 424,
+ "digest": "sha256:f67dcc5fc786f04f0743abfe0ee5dae9bd8caf8efa6c8144f7f2a43889dc513b",
+ "platform": {
+ "architecture": "arm",
+ "os": "linux"
+ }
+ },
+ {
+ "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
+ "size": 424,
+ "digest": "sha256:b64ca0b60356a30971f098c92200b1271257f100a55b351e6bbe985638352f3a",
+ "platform": {
+ "architecture": "amd64",
+ "os": "linux"
+ }
+ },
+ {
+ "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
+ "size": 425,
+ "digest": "sha256:df436846483aff62bad830b730a0d3b77731bcf98ba5e470a8bbb8e9e346e4e8",
+ "platform": {
+ "architecture": "ppc64le",
+ "os": "linux"
+ }
+ },
+ {
+ "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
+ "size": 425,
+ "digest": "sha256:5bb8e50aa2edd408bdf3ddf61efb7338ff34a07b762992c9432f1c02fc0e5e62",
+ "platform": {
+ "architecture": "s390x",
+ "os": "linux"
+ }
+ }
+ ]
+}
+</pre></div> <h3 id="push-to-an-insecure-registry">Push to an insecure registry</h3> <p>Here is an example of creating and pushing a manifest list using a known insecure registry.</p> <div class="highlight"><pre class="highlight" data-language="">$ docker manifest create --insecure myprivateregistry.mycompany.com/repo/image:1.0 \
+ myprivateregistry.mycompany.com/repo/image-linux-ppc64le:1.0 \
+ myprivateregistry.mycompany.com/repo/image-linux-s390x:1.0 \
+ myprivateregistry.mycompany.com/repo/image-linux-arm:1.0 \
+ myprivateregistry.mycompany.com/repo/image-linux-armhf:1.0 \
+ myprivateregistry.mycompany.com/repo/image-windows-amd64:1.0 \
+ myprivateregistry.mycompany.com/repo/image-linux-amd64:1.0
+
+$ docker manifest push --insecure myprivateregistry.mycompany.com/repo/image:tag
+</pre></div> <blockquote> <p><strong>Note</strong></p> <p>The <code class="language-plaintext highlighter-rouge">--insecure</code> flag is not required to annotate a manifest list, since annotations are to a locally-stored copy of a manifest list. You may also skip the <code class="language-plaintext highlighter-rouge">--insecure</code> flag if you are performing a <code class="language-plaintext highlighter-rouge">docker manifest inspect</code> on a locally-stored manifest list. Be sure to keep in mind that locally-stored manifest lists are never used by the engine on a <code class="language-plaintext highlighter-rouge">docker pull</code>.</p> </blockquote> <h2 id="child-commands">Child commands</h2> <table> <thead> <tr> <td>Command</td> <td>Description</td> </tr> </thead> <tbody> <tr> <td><a href="../manifest_annotate/index">docker manifest annotate</a></td> <td>Add additional information to a local image manifest</td> </tr> <tr> <td><a href="../manifest_create/index">docker manifest create</a></td> <td>Create a local manifest list for annotating and pushing to a registry</td> </tr> <tr> <td><a href="../manifest_inspect/index">docker manifest inspect</a></td> <td>Display an image manifest, or manifest list</td> </tr> <tr> <td><a href="../manifest_push/index">docker manifest push</a></td> <td>Push a manifest list to a repository</td> </tr> <tr> <td><a href="../manifest_rm/index">docker manifest rm</a></td> <td>Delete one or more manifest lists from local storage</td> </tr> </tbody> </table> <div class="_attribution">
+ <p class="_attribution-p">
+ &copy; 2019 Docker, Inc.<br>Licensed under the Apache License, Version 2.0.<br>Docker and the Docker logo are trademarks or registered trademarks of Docker, Inc. in the United States and/or other countries.<br>Docker, Inc. and other parties may also have trademark rights in other terms used herein.<br>
+ <a href="https://docs.docker.com/engine/reference/commandline/manifest/" class="_attribution-link">https://docs.docker.com/engine/reference/commandline/manifest/</a>
+ </p>
+</div>