{"record":{"id":"45b2f2951c689044","repo":"jdx/mise","slug":"mise-oci-currently-supports-only-apt-and-apk-entri","errorCode":null,"errorMessage":"mise oci currently supports only apt and apk entries in [bootstrap.packages]; unsupported manager(s): {}","messagePattern":"mise oci currently supports only apt and apk entries in \\[bootstrap\\.packages\\]; unsupported manager\\(s\\): (.+?)","errorType":"exception","errorClass":"eyre::Report","httpStatus":null,"severity":"error","filePath":"src/oci/packages.rs","lineNumber":192,"sourceCode":"    managers: &[ManagerPackages],\n) -> Result<Option<(OciPackageManager, Vec<PackageRequest>)>> {\n    let mut apk = vec![];\n    let mut apt = vec![];\n    let mut unsupported = vec![];\n    for mgr in managers {\n        if mgr.disabled || mgr.requests.is_empty() {\n            continue;\n        }\n        match mgr.manager.name() {\n            \"apk\" => apk.extend(mgr.requests.clone()),\n            \"apt\" => apt.extend(mgr.requests.clone()),\n            other => unsupported.push(other.to_string()),\n        }\n    }\n    if !unsupported.is_empty() {\n        unsupported.sort();\n        unsupported.dedup();\n        bail!(\n            \"mise oci currently supports only apt and apk entries in [bootstrap.packages]; \\\n             unsupported manager(s): {}\",\n            unsupported.join(\", \")\n        );\n    }\n    if !apk.is_empty() && !apt.is_empty() {\n        bail!(\n            \"mise oci cannot mix apk and apt entries in [bootstrap.packages]; use the package \\\n             manager matching the selected base image\"\n        );\n    }\n    if !apk.is_empty() {\n        Ok(Some((OciPackageManager::Apk, apk)))\n    } else if !apt.is_empty() {\n        Ok(Some((OciPackageManager::Apt, apt)))\n    } else {\n        Ok(None)\n    }","sourceCodeStart":174,"sourceCodeEnd":210,"githubUrl":"https://github.com/jdx/mise/blob/9dcfcaa0dc8747a2577d3270b69bb9d8313b2807/src/oci/packages.rs#L174-L210","documentation":"Thrown by `mise oci build` when the `[bootstrap.packages]` table in mise.toml contains entries for package managers other than `apt` or `apk`. The OCI system-package layer builder (collect_package_requests in src/oci/packages.rs) can only chroot-install Debian-style apt or Alpine-style apk entries, so it collects all unsupported manager names up front, sorts and dedups them, and fails before any image work starts.","triggerScenarios":"mise.toml (or any layered config: ~/.config/mise/config.toml, MISE_CONFIG_FILE, directory-level mise.tomls) defines `[bootstrap.packages.brew]`, `[bootstrap.packages.dnf]`, `[bootstrap.packages.pacman]`, `[bootstrap.packages.yum]`, etc. with at least one non-empty request, and the user runs `mise oci build`.","commonSituations":"Reusing a mise.toml written for host setup where brew/dnf are valid; merging config from a teammate or a global CI config that adds system packages for non-container platforms; assuming `mise oci` supports every manager that plain `mise bootstrap` does.","solutions":["Convert the unsupported entries to `[bootstrap.packages.apk]` (Alpine/Wolfi base) or `[bootstrap.packages.apt]` (Debian/Ubuntu base) so the manager matches the base image","Remove the unsupported manager tables from the config used for oci builds and install those tools as mise dev tools (`mise use node@22`, etc.) instead of system packages","Check every layered mise.toml for a stray table contributing the unsupported manager name shown in the message","Keep a dedicated mise.toml for oci builds if the same config must retain brew/dnf entries for host use"],"exampleFix":"# before (mise.toml)\n[bootstrap.packages.brew]\nripgrep = \"any\"\n\n# after — manager matching a Debian/Ubuntu base image\n[bootstrap.packages.apt]\nripgrep = \"any\"","handlingStrategy":"validation","validationCode":"// Run before invoking `mise oci build` — parse the effective config's\n// [bootstrap.packages] table and allow only apt/apk keys.\nfn validate_bootstrap_packages(cfg: &toml::Table) -> Result<(), String> {\n    let Some(pkgs) = cfg.get(\"bootstrap\").and_then(|b| b.get(\"packages\")).and_then(|p| p.as_table()) else {\n        return Ok(());\n    };\n    let supported = [\"apt\", \"apk\"];\n    let bad: Vec<&String> = pkgs\n        .keys()\n        .filter(|k| !supported.contains(&k.as_str()))\n        .collect();\n    if !bad.is_empty() {\n        return Err(format!(\"mise oci supports only apt/apk; unsupported: {bad:?}\"));\n    }\n    Ok(())\n}","typeGuard":"fn is_supported_oci_manager(name: &str) -> bool {\n    matches!(name, \"apt\" | \"apk\")\n}","tryCatchPattern":null,"preventionTips":["Keep a dedicated mise.toml for oci builds instead of reusing host configs that legitimately need brew/dnf","Add a CI lint step that fails when [bootstrap.packages] contains any key other than apt or apk","Review layered configs (global, directory, MISE_CONFIG_FILE) — a stray table anywhere triggers this at build time"],"tags":["mise","oci","bootstrap-packages","config-validation","package-manager"],"backgroundTag":"config-validation-failed","analyzedSha":"9dcfcaa0dc8747a2577d3270b69bb9d8313b2807","analyzedAt":"2026-08-17T14:28:50.624Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}