{"id":13581520,"url":"https://github.com/estesp/manifest-tool","last_synced_at":"2025-05-14T19:06:48.342Z","repository":{"id":37612286,"uuid":"54153294","full_name":"estesp/manifest-tool","owner":"estesp","description":"Command line tool to create and query container image manifest list/indexes","archived":false,"fork":false,"pushed_at":"2025-04-09T20:11:44.000Z","size":12462,"stargazers_count":789,"open_issues_count":13,"forks_count":97,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-04-10T02:16:24.577Z","etag":null,"topics":["container-image","container-images","container-registry","docker","docker-image","docker-images","docker-registry","multiarch","multiplatform","oci-distribution","oci-image"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/estesp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-17T21:39:24.000Z","updated_at":"2025-04-09T13:54:21.000Z","dependencies_parsed_at":"2024-04-08T20:27:43.506Z","dependency_job_id":"b5fc28f8-2771-4adb-9729-75eac2736e36","html_url":"https://github.com/estesp/manifest-tool","commit_stats":{"total_commits":403,"total_committers":33,"mean_commits":"12.212121212121213","dds":0.5483870967741935,"last_synced_commit":"078c1b36d90cf1dacd6e9528c78be6aa60f41cf2"},"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estesp%2Fmanifest-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estesp%2Fmanifest-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estesp%2Fmanifest-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estesp%2Fmanifest-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/estesp","download_url":"https://codeload.github.com/estesp/manifest-tool/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248142905,"owners_count":21054672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["container-image","container-images","container-registry","docker","docker-image","docker-images","docker-registry","multiarch","multiplatform","oci-distribution","oci-image"],"created_at":"2024-08-01T15:02:04.238Z","updated_at":"2025-04-10T02:16:37.494Z","avatar_url":"https://github.com/estesp.png","language":"Go","funding_links":[],"categories":["Go","docker"],"sub_categories":[],"readme":"## manifest-tool\n\n`manifest-tool` is a command line utility used to view or push multi-platform container image\nreferences located in an OCIv1 or Docker v2.2 compatible container registry.\n\nWhile several other tools include more complete capabilities to view and manipulate the\n*manifest* objects associated with container images and artifacts, `manifest-tool` was created\nas one of the first command line tools capable of assembling \"manifest lists\" (Docker v2.2), now\nmore commonly known as \"indexes\" in the OCIv1 image specification. [**Manifest lists**](https://github.com/distribution/distribution/blob/main/docs/content/spec/manifest-v2-2.md#manifest-list) or\n[**indexes**](https://github.com/opencontainers/image-spec/blob/main/image-index.md) exist for\nthe purpose of combining an array of architecture and platform specific container image manifests\nunder a single reference. This allows a container runtime to select the appropriate index\nentry that matches the local node's architecture and platform. Before these kinds of manifests\nwere available it required separate instructions, configurations, or code changes to set\nup the appropriate platform-specific image reference depending on the platform in use.\n\n### Installation\n\nThe releases of `manifest-tool` are built using the latest Go version, and binaries for many\narchitectures are available as pre-built binaries with each release, found on the\n[GitHub releases](https://github.com/estesp/manifest-tool/releases) page.\n\nYou can also use `manifest-tool` via an existing Docker image automatically generated for a\nlarge number of architectures with each release. To use this image simply run\n```sh\n$ docker run mplatform/manifest-tool\n```\n\nTo build `manifest-tool` locally, clone this repository and build the binary as shown below.\nNote that you will need to have a recent version of the Go SDK installed on your system as well\nas `make`.\n\n```sh\n$ git clone https://github.com/estesp/manifest-tool\n$ cd manifest-tool \u0026\u0026 make binary\n```\n\nIf you don't want to install a local development environment but have Docker installed, you\ncan use `make build` to build `manifest-tool` inside the official Go SDK container.\n\nAdditional targets `make static` target will build a statically-linked binary,\nand `make cross` will build a binary for all supported platforms using Go's cross-compilation\ncapabilities.\n\n### Querying Manifests Without Installation\n\nIf you only have a requirement to query public image references to validate\nplatform support you can use a related project, [mquery](https://github.com/estesp/mquery),\nwhich allows remote querying of public registry images.\n\nUse `mquery` by running it's DockerHub-located image, **mplatform/mquery:latest**, and\nspecifying a target image to query, as shown in the example below:\n\n```sh\n$ docker run --rm mplatform/mquery mplatform/mquery:latest\nImage: mplatform/mquery:latest (digest: sha256:d0989420b6f0d2b929fd9355f15c767f62d0e9a72cdf999d1eb16e6073782c71)\n * Manifest List: Yes (Image type: application/vnd.docker.distribution.manifest.list.v2+json)\n * Supported platforms:\n   - linux/ppc64le\n   - linux/amd64\n   - linux/386\n   - linux/s390x\n   - linux/riscv64\n   - linux/arm64/v8\n   - linux/arm/v7\n   - linux/arm/v6\n   - windows/amd64:10.0.17763.2300\n   - windows/amd64:10.0.14393.4770\n```\n\nThe `mquery` program itself is a small Go program running as an AWS\nLambda function using a small cache so recent image results are cached.\nMore information is available in the [mquery GitHub repo](https://github.com/estesp/mquery).\n\nOutdated, but original, details on the creation of mquery are found in\n[my blog post from the Moby Summit EU 2017](https://integratedcode.us/2017/11/21/moby-summit-serverless-openwhisk-multi-arch/)\non this topic.\n\n### Sample Usage\n\n`manifest-tool` can:\n -  **inspect** manifests (of all media types) within any registry supporting the OCI distribution API\n - **push** manifest list/index objects to any registry which supports the OCI distribution API and the appropriate image (Docker or OCI) image specification.\n\n\u003e *Note:* For pushing you will have to provide your registry credentials via either a) the command line, b) use a credential helper application (`manifest-tool` supports these in the same way Docker client does), or c) already\nbe logged in to a registry and have an existing Docker client configuration file with credentials.\n\n#### Inspect\n\nInspect/view the manifest of any image reference (*repo/image:tag* combination)\nwith the **inspect** command. You must provide a tag, even if the tag is `latest` as\nthe containerd resolver does not auto-append latest to image references and `manifest-tool`\nutilizes the containerd resolver library.\n\nExample output of an `inspect` on a manifest list media type is shown below:\n\n```sh\n$ manifest-tool inspect golang:1.17\nName:   golang:1.17 (Type: application/vnd.docker.distribution.manifest.list.v2+json)\nDigest: sha256:1a35cc2c5338409227c7293add327ebe42e1ee5465049f6c57c829588e3f8a39\n * Contains 10 manifest references:\n[1]     Type: application/vnd.docker.distribution.manifest.v2+json\n[1]   Digest: sha256:a6c0b3e8b7d2faed2415448f20e75ed26eed6fdb1d261873ed4205907d92c674\n[1]   Length: 1796\n[1] Platform:\n[1]    -      OS: linux\n[1]    -    Arch: amd64\n[1] # Layers: 7\n     layer 01: digest = sha256:0c6b8ff8c37e92eb1ca65ed8917e818927d5bf318b6f18896049b5d9afc28343\n     layer 02: digest = sha256:412caad352a3ecbb29c080379407ae0761e7b9b454f7239cbfd1d1da25e06b29\n     layer 03: digest = sha256:e6d3e61f7a504fa66d7275123969e9917570188650eb84b2280a726b996040f6\n     layer 04: digest = sha256:461bb1d8c517c7f9fc0f1df66c9dc34c85a23421c1e1c540b2e28cbb258e75f5\n     layer 05: digest = sha256:9297634c9537024497f76a2e1b374d8a315baa21d45bf36dc7980dc42ab93b0b\n     layer 06: digest = sha256:c9cefb9872505d3a6fdcbbdbe4103393da3e384443c5a8cdd62bc368927ea1cc\n     layer 07: digest = sha256:8560fc463426dc7e494720250efec25cdae1c4bf796c1a0172f791c0c7dde1c6\n\n... skipping 8 manifest entries\n\n[10]     Type: application/vnd.docker.distribution.manifest.v2+json\n[10]   Digest: sha256:78af34429b7d75d61890746d39e27beb447970bad6803ed11ab4be920dbbd061\n[10]   Length: 3401\n[10] Platform:\n[10]    -      OS: windows\n[10]    - OS Vers: 10.0.17763.2565\n[10]    -    Arch: amd64\n[10] # Layers: 13\n     layer 01: digest = sha256:4612f6d0b889cad0ed0292fae3a0b0c8a9e49aff6dea8eb049b2386d9b07986f\n     layer 02: digest = sha256:1bd78008c728d8f9e56dc2093e6eb55f0f0b1aa96e5d0c7ccc830c5f60876cdf\n     layer 03: digest = sha256:f0c1566a9285d9465334dc923e9d6fd93a51b3ef6cb8497efcacbcf64e3b93fc\n     layer 04: digest = sha256:1b56caecef9c44ed58d2621ffb6f87f797b532c81f1271d9c339222462523eb2\n     layer 05: digest = sha256:5a3ed0a076d58c949f5debdbc3616b6ccd008426c62635ab387836344123e2a6\n     layer 06: digest = sha256:f25f9584c1aa90dae36704d6bef0e59e72002fcb13e8a4618f64c9b13479c0df\n     layer 07: digest = sha256:12d4fbc7cf0f85fc63860f052f76bfb4429eca8b878abce79a25bfdc30f9e9f5\n     layer 08: digest = sha256:c325dc9f1660ea537aae55b89be63d336762d5a3a02e929d52940586fb0f677e\n     layer 09: digest = sha256:dd4f3aabaa2a9bf80e2a7f417dba559f6b34e640c21b138dce099328406c8903\n     layer 10: digest = sha256:57e61367d26baed9e16a8d5310c520ae3429d5cc7956569f325cd9de01f33604\n     layer 11: digest = sha256:98eb9abc560e8d857685b3b0131c733bdbb5f3c79e93fe7e9163e443736c2f51\n     layer 12: digest = sha256:fffb0b96d90540c5fe04bec7c3803e767fc06c03da00c569b92ec1abeb2db503\n     layer 13: digest = sha256:e6c16363a908ee64151cd232d466b723e3edac978f1c7693db3dcbed09694d76\n```\n\nWhile we can query non-manifest lists/indexes as well, this entry is clearly\na manifest list (see the media type) with many platforms supported. To read how\ncontainer engines like Docker use this information to determine what image/layers\nto pull read this early [blog post on multi-platform support in Docker](https://integratedcode.us/2016/04/22/a-step-towards-multi-platform-docker-images/).\n\n#### Create/Push\n\nYou can create manifest list or index entries in a registry by using the **push**\ncommand with either a YAML file describing the images to assemble or by using\na series of command line parameters.\n\nA sample YAML file is shown below. As long as the target registry supports the\ncross-repository push feature the source and target image names can differ as\nlong as they are within the same registry host. For example, a source image could\nbe named `myprivreg:5000/someimage_arm64:latest` and\nreferenced by a manifest list in repository  `myprivreg:5000/someimage:latest`.\n\nGiven a private registry running on port 5000, here is a sample YAML file input\nto `manifest-tool` to create a manifest list combining an 64-bit ARMv8 image and\nan amd64 image:\n\n```yaml\nimage: myprivreg:5000/someimage:latest\ntags: [\"1.0.0\", \"1.0\", \"1\"]\nmanifests:\n  -\n    image: myprivreg:5000/someimage:arm64\n    platform:\n      architecture: arm64\n      os: linux\n  -\n    image: myprivreg:5000/someimage:amd64\n    platform:\n      architecture: amd64\n      os: linux\n```\n\n\u003e Note: Of course these component images must have been built and pushed to\n\u003e your target registry before running `manifest-tool`. The job of `manifest-tool` is\n\u003e simply to create the manifest which assembles existing images under a combined\n\u003e image reference pointing to a manifest list or OCI index.\n\nGiven this example YAML input you can push this manifest list as follows:\n\n```sh\n$ manifest-tool push from-spec someimage.yaml\n```\n\n`manifest-tool` can also use command line arguments with a templating model to\nspecify the architecture/platform list and the from and to image formats as\nshown below:\n\n```sh\n$ manifest-tool push from-args \\\n    --platforms linux/amd64,linux/s390x,linux/arm64 \\\n    --template foo/bar-ARCH:v1 \\\n    --tags v1.0.0,v1.0 \\\n    --target foo/bar:v1\n```\n\nSpecifically:\n - `--platforms` specifies which platforms you want to push for in the form OS/ARCH,OS/ARCH,...\n - `--template` specifies the image repo:tag source for inputs by replacing the placeholders `OS`, `ARCH` and `VARIANT` with the inputs from `--platforms`.\n - `--tags` specifies the tags to apply to the target image in addition to the `--target` tag.\n - `--target` specifies the target image repo:tag that will be the manifest list entry in the registry.\n\nWhen using the optional `VARIANT` placeholder, it is ignored when a `platform` does not have a variant.\n\n```sh\n$ manifest-tool push from-args \\\n    --platforms linux/amd64,linux/arm/v5,linux/arm/v7 \\\n    --template foo/bar-ARCHVARIANT:v1 \\\n    --target foo/bar:v1\n```\n\nFor the above example, `linux/amd64` when applied to the template will\nlook for an image named `foo/bar-amd64:v1`, while the platform entry `linux/arm/v5`\nwill resolve to an image reference: `foo/bar-armv5:v1`.\n\n### Known Supporting Registries\n\nAll major public cloud registries have added Docker v2.2 manifest list support\nover the years since the \"fat manifest\"-enabled specification came out in 2016.\n\nMost registries also support the formalization of that via the \"index\" manifest\ntype in the OCIv1 image format specification published in 2017.\n\nIf you find a registry provider for which `manifest-tool` does not work properly\nplease open an issue in the GitHub issues for this project.\n\n### Test Index/Manifest List Support\n\nIf you operate or use a registry claiming conformance to Docker v2.2 spec and API\nor the OCIv1 image spec and distribution spec and want to confirm manifest list/index\nsupport please use the pre-configured test script available in this repository.\n\nSee the [test-registry.sh script](https://github.com/estesp/manifest-tool/blob/main/integration/test-registry.sh) in this repo's **integration** directory\nfor further details. A simple example is shown here:\n\n```sh\n$ ./test-registry.sh r.myprivreg.com/somerepo\n```\n\n### History\n\nThis `manifest-tool` codebase was initially a joint project with [Harshal Patil](https://github.com/harche) from IBM Bangalore, and originally forked from the registry client codebase, skopeo, created by [Antonio Murdaca/runc0m](https://github.com/runcom), that later became a part of [Project Atomic](https://github.com/projectatomic/skopeo). Skopeo then\nbecame part of the overall Red Hat container client tooling later in its lifetime where it still resides today in the\n[GitHub containers organization](https://github.com/containers). The **v2** rewrite of `manifest-tool` removed all\nthe original vestiges of skopeo's original registry client and manifest parsing code, but is still part of the **v1**\nreleases of `manifest-tool` and codebase.\n\nThanks to both Antonio and Harshal for their initial work that made this possible! Also, thanks to Christy Perez from IBM Systems for her hard work in bringing the functionality of `manifest-tool` to the Docker client via [a docker/cli PR](https://github.com/docker/cli/pull/138). In early 2018 this PR formed the basis of a new `docker manifest` command\nwhich comprised most of the original code of `manifest-tool` and made multi-platform image creation available to\nusers of the Docker client.\n\n### License\n\n`manifest-tool` is licensed under the Apache Software License (ASL) 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Festesp%2Fmanifest-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Festesp%2Fmanifest-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Festesp%2Fmanifest-tool/lists"}