jdx/mise · error
oci mount_point must be an absolute path
Error message
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. What it means
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.
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.
Example fix
// before (mise.toml) [oci] mount_point = "mise-data" // after [oci] mount_point = "/mise-data"
Defensive patterns
Strategy: validation
Validate before calling
let mp = config.oci.mount_point.clone().unwrap_or_default();
if !mp.starts_with('/') {
return Err(format!("oci mount_point must be absolute, got {mp:?}"));
} Prevention
- 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 '/'.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- install_mise must be an absolute path or start with ~/
- install_mise must name an executable file
- install_mise must not contain a newline
- managed system path must be absolute
- mise oci cannot mix apk and apt entries in…
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/1d18cf48cda37eeb.
Report an issue: GitHub.
Appendix: source
Thrown at src/oci/builder.rs:193
warn!("mise oci build: no tools in the toolset — image will have only the base layer");
}
reject_unsupported_backends(&versions)?;
file::create_dir_all(&self.opts.out_dir)?;
let layout = ImageLayout::init(&self.opts.out_dir)?;
let mount_point = self
.opts
.mount_point
.clone()
.or_else(|| self.oci.mount_point.clone())
.unwrap_or_else(|| Settings::get().oci.default_mount_point.clone());
let mount_point = mount_point.trim_end_matches('/').to_string();
if mount_point.is_empty() {
bail!("oci mount_point must not be empty");
}
if !mount_point.starts_with('/') {
bail!(
"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."
);
}
let owner = resolve_layer_owner(self.opts.owner, &self.oci);
let copies: Vec<&OciCopy> = self.oci.copy.iter().chain(&self.opts.copy).collect();
// --- 1. Base image (optional) ---
let from_ref = self
.opts
.from
.clone()
.or_else(|| self.oci.from.clone())
.or_else(|| {
let s = Settings::get().oci.default_from.clone();
if s.is_empty() { None } else { Some(s) }View on GitHub (pinned to 533346cc37)