From 3744a9dc66575695d7f66dded928ee317df2ed74 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 30 Jul 2021 10:22:33 -0400 Subject: [PATCH] oci: Pass through other architectures I think the OCI arch matches the kernel architecture on other platforms. --- lib/src/container/oci.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/container/oci.rs b/lib/src/container/oci.rs index a9a09717..9ffc5238 100644 --- a/lib/src/container/oci.rs +++ b/lib/src/container/oci.rs @@ -173,7 +173,8 @@ impl<'a> OciWriter<'a> { #[context("Writing OCI")] pub(crate) fn complete(&mut self) -> Result<()> { let utsname = nix::sys::utsname::uname(); - let arch = MACHINE_TO_OCI[utsname.machine()]; + let machine = utsname.machine(); + let arch = MACHINE_TO_OCI.get(machine).unwrap_or(&machine); let rootfs_blob = self.root_layer.as_ref().unwrap(); let root_layer_id = format!("sha256:{}", rootfs_blob.uncompressed_sha256);