{"record":{"id":"cca9a8dbb3efd71b","repo":"jdx/mise","slug":"index-json-lists-manifests-multi-manifest","errorCode":null,"errorMessage":"{}: index.json lists {} manifests; multi-manifest layouts are not supported","messagePattern":"(.+?): index\\.json lists (.+?) manifests; multi-manifest layouts are not supported","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/oci/registry.rs","lineNumber":949,"sourceCode":"    update_index: bool,\n) -> Result<PushSummary> {\n    eyre::ensure!(\n        !crate::config::Settings::get().offline(),\n        \"offline mode is enabled\"\n    );\n    let r = Reference::parse(reference)?;\n    let layout = ImageLayout {\n        root: image_dir.to_path_buf(),\n    };\n\n    // Resolve the layout's single manifest. `mise oci build` always writes\n    // exactly one manifest into index.json.\n    let index_bytes = crate::file::read(image_dir.join(\"index.json\"))?;\n    let index: ImageIndex = serde_json::from_slice(&index_bytes).wrap_err(\"parsing index.json\")?;\n    let manifest_desc = match index.manifests.as_slice() {\n        [one] => one,\n        [] => bail!(\"{}: index.json lists no manifests\", image_dir.display()),\n        many => bail!(\n            \"{}: index.json lists {} manifests; multi-manifest layouts are not supported\",\n            image_dir.display(),\n            many.len()\n        ),\n    };\n    let manifest_bytes = layout.read_blob(&manifest_desc.digest)?;\n    let manifest: ImageManifest =\n        serde_json::from_slice(&manifest_bytes).wrap_err(\"parsing image manifest blob\")?;\n\n    // Cross-repo mount source: the base image's repository, when it lives on\n    // the destination registry (and isn't the destination repo itself).\n    let mount_from = manifest\n        .annotations\n        .get(ANNOTATION_BASE_NAME)\n        .and_then(|name| Reference::parse(name).ok())\n        .filter(|base| base.registry == r.registry && base.repository != r.repository)\n        .map(|base| base.repository);\n","sourceCodeStart":931,"sourceCodeEnd":967,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/oci/registry.rs#L931-L967","documentation":"Thrown during `push_image` when `index.json` lists more than one manifest. The tool only supports single-manifest OCI layouts (what `mise oci build` always produces) and refuses multi-manifest (multi-arch index) layouts.","triggerScenarios":"Pushing an image directory whose index.json was produced by another tool (e.g. `podman save`-style layouts, buildctl, or manual multi-arch assembly) containing multiple manifest descriptors.","commonSituations":"Trying to push a multi-arch index built with docker buildx / podman manifest directly from its OCI layout directory; reusing an output directory that accumulated manifests across builds.","solutions":["Push a single-platform image: build one manifest per platform and push each separately.","Use `mise oci build` to regenerate a single-manifest layout in a clean directory.","If multi-arch is required, push each manifest via this tool and assemble the index with another tool (e.g. `docker manifest create`)."],"exampleFix":"// before: multi-manifest index\n{ \"manifests\": [ {\"digest\": \"sha256:aaa\"}, {\"digest\": \"sha256:bbb\"} ] }\n// after: keep only one manifest (or split into per-platform pushes)\n{ \"manifests\": [ {\"mediaType\": \"application/vnd.oci.image.manifest.v1+json\", \"digest\": \"sha256:aaa\", \"size\": 1234} ] }","handlingStrategy":"validation","validationCode":"let index: serde_json::Value = serde_json::from_slice(\n    &std::fs::read(image_dir.join(\"index.json\"))?,\n)?;\nlet n = index[\"manifests\"].as_array().map(|a| a.len()).unwrap_or(0);\nif n > 1 { eprintln!(\"multi-manifest layout detected ({n}); split per-platform before pushing\"); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Don't point the pusher at buildx/podman multi-arch output directories.","Use a fresh output directory per build to avoid accumulating manifests.","Push per-platform images individually and assemble multi-arch indexes with a dedicated tool."],"tags":["oci","image-layout","unsupported","push","multi-arch"],"backgroundTag":"unsupported-operation","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}