{"record":{"id":"1d18cf48cda37eeb","repo":"jdx/mise","slug":"oci-mount-point-must-be-an-absolute-path-got-mou","errorCode":null,"errorMessage":"oci mount_point must be an absolute path (got {mount_point:?}); a relative value makes MISE_DATA_DIR inside the container depend on the working directory and mis-resolve tools.","messagePattern":"oci mount_point must be an absolute path \\(got (.+?)\\); a relative value makes MISE_DATA_DIR inside the container depend on the working directory and mis-resolve tools\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/oci/builder.rs","lineNumber":193,"sourceCode":"            warn!(\"mise oci build: no tools in the toolset — image will have only the base layer\");\n        }\n        reject_unsupported_backends(&versions)?;\n\n        file::create_dir_all(&self.opts.out_dir)?;\n        let layout = ImageLayout::init(&self.opts.out_dir)?;\n\n        let mount_point = self\n            .opts\n            .mount_point\n            .clone()\n            .or_else(|| self.oci.mount_point.clone())\n            .unwrap_or_else(|| Settings::get().oci.default_mount_point.clone());\n        let mount_point = mount_point.trim_end_matches('/').to_string();\n        if mount_point.is_empty() {\n            bail!(\"oci mount_point must not be empty\");\n        }\n        if !mount_point.starts_with('/') {\n            bail!(\n                \"oci mount_point must be an absolute path (got {mount_point:?}); \\\n                 a relative value makes MISE_DATA_DIR inside the container \\\n                 depend on the working directory and mis-resolve tools.\"\n            );\n        }\n\n        let owner = resolve_layer_owner(self.opts.owner, &self.oci);\n        let copies: Vec<&OciCopy> = self.oci.copy.iter().chain(&self.opts.copy).collect();\n\n        // --- 1. Base image (optional) ---\n        let from_ref = self\n            .opts\n            .from\n            .clone()\n            .or_else(|| self.oci.from.clone())\n            .or_else(|| {\n                let s = Settings::get().oci.default_from.clone();\n                if s.is_empty() { None } else { Some(s) }","sourceCodeStart":175,"sourceCodeEnd":211,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/oci/builder.rs#L175-L211","documentation":"After resolving and trimming the mount point, the OCI builder requires it to be an absolute path (starts with '/'). A relative mount point would make MISE_DATA_DIR inside the container depend on the container process's working directory, so installed tools would be looked up in the wrong place. The error includes the offending value for diagnosis.","triggerScenarios":"build (via send) with mount_point set to a relative path, e.g. mount_point = \"mise-data\" or \"./data\", in the build request, [oci] project settings, or oci.default_mount_point settings.","commonSituations":"Writing `[oci] mount_point = \"data\"` in mise.toml by analogy with other relative config paths; a scripted config generator emitting a relative path; pasting a container-relative path from docs.","solutions":["Prefix the value with '/' in the build request or [oci] config, e.g. mount_point = \"/mise\".","If the path must be resolved relative to the host project, compute and pass an absolute path (std::path::absolute) before building the image.","Fix any templating that yields a relative path from env vars or workspace-relative values."],"exampleFix":"// before (mise.toml)\n[oci]\nmount_point = \"mise-data\"\n\n// after\n[oci]\nmount_point = \"/mise-data\"","handlingStrategy":"validation","validationCode":"let mp = config.oci.mount_point.clone().unwrap_or_default();\nif !mp.starts_with('/') {\n    return Err(format!(\"oci mount_point must be absolute, got {mp:?}\"));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep container mount points absolute by convention; document it next to the [oci] config.","Resolve host-relative paths to absolute before writing them into config.","Lint project mise.toml files for [oci] values not starting with '/'."],"tags":["oci","config","path","validation"],"backgroundTag":"invalid-config-value","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"}