From 6237b9991c2e5d06cab7b4a90e4f602550bd54a9 Mon Sep 17 00:00:00 2001 From: Arron Wang Date: Fri, 26 Nov 2021 22:15:29 +0800 Subject: [PATCH] image_rpc: Fix the image store path the "latest" is the tag info, real data will store in image_oci directory Fixes: #3041 Signed-off-by: Arron Wang --- src/agent/src/image_rpc.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/agent/src/image_rpc.rs b/src/agent/src/image_rpc.rs index 6c185707df..84c943cb39 100644 --- a/src/agent/src/image_rpc.rs +++ b/src/agent/src/image_rpc.rs @@ -22,7 +22,7 @@ use crate::AGENT_CONFIG; const SKOPEO_PATH: &str = "/usr/bin/skopeo"; const UMOCI_PATH: &str = "/usr/local/bin/umoci"; -const IMAGE_OCI: &str = "image_oci:latest"; +const IMAGE_OCI: &str = "image_oci"; const AA_PATH: &str = "/usr/local/bin/attestation-agent"; const AA_PORT: &str = "127.0.0.1:50000"; const OCICRYPT_CONFIG_PATH: &str = "/tmp/ocicrypt_config.json"; @@ -58,7 +58,7 @@ impl ImageService { let tmp_cid_path = Path::new("/tmp/").join(cid); let oci_path = tmp_cid_path.join(IMAGE_OCI); - let target_path_oci = format!("oci://{}", oci_path.to_string_lossy()); + let target_path_oci = format!("oci://{}:latest", oci_path.to_string_lossy()); fs::create_dir_all(&oci_path)?;