{"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":181,"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":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/jdx/mise/blob/9dcfcaa0dc8747a2577d3270b69bb9d8313b2807/src/oci/builder.rs#L163-L199","documentation":"The OCI build mount point must be an absolute path starting with '/'. mise embeds the mount point into the image as MISE_DATA_DIR, so a relative value would make tool resolution inside the container depend on the process's working directory and break. The check fires right after the empty-check, naming the offending value.","triggerScenarios":"`mount_point = \"mise\"` or `\"opt/mise\"` (no leading slash) in `[oci]` of mise.toml, build options, or via `oci.default_mount_point`. Any `mise oci build` then aborts before layer construction.","commonSituations":"Users trimming the leading slash by accident; configs ported from relative-path conventions; templating that strips leading slashes.","solutions":["Prefix the value with '/': `mount_point = \"/mise\"`","Omit the setting to use the default `/mise`","Lint mise.toml for oci paths starting with '/' before running oci build"],"exampleFix":"# before (mise.toml)\n[oci]\nmount_point = \"mise\"\n\n# after (mise.toml)\n[oci]\nmount_point = \"/mise\"","handlingStrategy":"validation","validationCode":"python3 - <<'EOF'\nimport tomllib, sys\ncfg = tomllib.load(open('mise.toml', 'rb'))\nmp = cfg.get('oci', {}).get('mount_point', '/mise')\nif not mp.startswith('/'): sys.exit(f'mount_point {mp!r} must be absolute')\nprint('mount_point OK:', mp)\nEOF","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always write oci paths with a leading slash","If templating mise.toml, guard against templates stripping the leading '/'","Prefer omitting mount_point to inherit the validated default"],"tags":["oci","build","config","validation","absolute-path"],"backgroundTag":"config-validation-failed","analyzedSha":"9dcfcaa0dc8747a2577d3270b69bb9d8313b2807","analyzedAt":"2026-08-17T14:28:50.624Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}