jdx/mise · error
oci mount_point must not be empty
Error message
oci mount_point must not be empty
What it means
The OCI builder resolves the container's mount point from the build request, then the project [oci] settings, then Settings::get().oci.default_mount_point. After trimming trailing slashes it refuses to continue if the resulting path is empty, because an empty mount point would map MISE_DATA_DIR to the container root and corrupt/confuse tool layout. This is a fail-fast validation before any image layers are built.
Solutions
- Set a valid absolute mount point in settings: `mise settings set oci.default_mount_point /mise` (or set [oci] mount_point in the project config).
- If the build request sets mount_point, change it to a non-empty absolute path like "/opt/mise-data".
- Check for config templating that resolves to an empty value (e.g. an unset env var interpolated into the setting).
Example fix
// before (settings.toml) [oci] default_mount_point = "" // after [oci] default_mount_point = "/mise"
Defensive patterns
Strategy: validation
Validate before calling
let mp = std::env::var("MISE_OCI_DEFAULT_MOUNT_POINT").unwrap_or_default();
if mp.trim_end_matches('/').is_empty() {
return Err("oci mount_point must be set to a non-empty absolute path".into());
} Prevention
- Always set oci.default_mount_point to an absolute path in settings.toml.
- Never template mount_point from env vars that may be unset.
- Add a CI check that renders the final settings and asserts mount_point is non-empty.
When it happens
Trigger: Calling build (via send) when every source is empty: the request's mount_point is Some("") or None, self.oci.mount_point is empty/None, and oci.default_mount_point in settings is an empty string (or only slashes, which trim to "").
Common situations: Users set `[oci] default_mount_point = ""` or `mount_point = "/"` in settings; a config template expands a variable to an empty string; a new install where the default was never populated.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- mise oci cannot mix apk and apt entries in…
- mise oci currently supports only apt and apk entries in…
- oci mount_point must be an absolute path
- agent ' ' `start_calendar_interval. ` must be between and
- agent ' ' `start_calendar_interval` must set at least one…
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/40670066f6bf01d3.
Report an issue: GitHub.
Appendix: source
Thrown at src/oci/builder.rs:190
pub(crate) async fn build(self) -> Result<BuildOutput> {
let versions = self.ts.list_current_versions();
if versions.is_empty() {
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())View on GitHub (pinned to 533346cc37)