jdx/mise · error · eyre::Report
apk system packages are not supported for OCI architecture {
Error message
apk system packages are not supported for OCI architecture {other:?} What it means
apk_architecture maps the target OCI architecture to an Alpine architecture name for the apk invocation. Only x86_64 (amd64/x86_64) and aarch64 (arm64/aarch64) are mapped; any other target platform (armv7, x86, riscv64, ppc64le) cannot be installed via this path, so mise refuses before running apk.
Source
Thrown at src/oci/packages.rs:600
}
Err(e) if e.kind() == std::io::ErrorKind::NotFound => Ok(()),
Err(e) => Err(e).wrap_err_with(|| format!("reading directory {}", path.display())),
}
}
fn apt_architecture(oci_arch: &str) -> Result<&'static str> {
match oci_arch {
"amd64" | "x86_64" => Ok("amd64"),
"arm64" | "aarch64" => Ok("arm64"),
other => bail!("apt system packages are not supported for OCI architecture {other:?}"),
}
}
fn apk_architecture(oci_arch: &str) -> Result<&'static str> {
match oci_arch {
"amd64" | "x86_64" => Ok("x86_64"),
"arm64" | "aarch64" => Ok("aarch64"),
other => bail!("apk system packages are not supported for OCI architecture {other:?}"),
}
}
fn snapshot(root: &Path) -> Result<BTreeMap<PathBuf, FsEntry>> {
let mut out = BTreeMap::new();
for entry in WalkDir::new(root).follow_links(false).sort_by_file_name() {
let entry = entry?;
let rel = entry.path().strip_prefix(root)?;
if rel.as_os_str().is_empty() {
continue;
}
out.insert(rel.to_path_buf(), fs_entry(entry.path())?);
}
Ok(out)
}
fn fs_entry(path: &Path) -> Result<FsEntry> {
let md = fs::symlink_metadata(path)?;View on GitHub (pinned to 9dcfcaa0dc)
Solutions
- Restrict oci builds that carry apk entries to linux/amd64 or linux/arm64
- Drop the `[bootstrap.packages.apk]` table for other platforms and preinstall packages in the base image for those targets
- Use a Dockerfile-based build for the unsupported platform instead of mise oci system packages
Defensive patterns
Strategy: validation
Validate before calling
// Gate apk-backed oci builds on supported platforms before invoking mise.
fn platform_supports_apk_packages(oci_arch: &str) -> bool {
matches!(oci_arch, "amd64" | "x86_64" | "arm64" | "aarch64")
}
if !platform_supports_apk_packages(&target_arch) {
eprintln!("skipping [bootstrap.packages.apk]: {target_arch} unsupported");
} Type guard
fn apk_arch_supported(oci_arch: &str) -> bool {
matches!(oci_arch, "amd64" | "x86_64" | "arm64" | "aarch64")
} Prevention
- Restrict multi-arch matrices to amd64/arm64 when using apk system packages
- Use base images with preinstalled packages for other architectures
When it happens
Trigger: `mise oci build` targeting a platform other than linux/amd64 or linux/arm64 (e.g. `--platform linux/riscv64`) while `[bootstrap.packages.apk]` entries are present.
Common situations: Building images for ARMv7 boards or SBCs where Alpine does ship packages but mise's OCI path has no arch mapping.
Related errors
- apt system packages are not supported for OCI architecture {
- mise oci needs a Linux host to install apk system packages i
- mise oci found apk packages in [bootstrap.packages], but the
- apk failed while installing OCI system packages: {} {}
- mise oci: no project mise config found in the current direct
AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17).
Data as JSON: /api/errors/1acc66ed99f14431.
Report an issue: GitHub.