jdx/mise · error

oci mount_point must be an absolute path (got {mount_point:?

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

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.

Source

Thrown at src/oci/builder.rs:181

            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 9dcfcaa0dc)

Solutions

  1. Prefix the value with '/': `mount_point = "/mise"`
  2. Omit the setting to use the default `/mise`
  3. Lint mise.toml for oci paths starting with '/' before running oci build

Example fix

# before (mise.toml)
[oci]
mount_point = "mise"

# after (mise.toml)
[oci]
mount_point = "/mise"
Defensive patterns

Strategy: validation

Validate before calling

python3 - <<'EOF'
import tomllib, sys
cfg = tomllib.load(open('mise.toml', 'rb'))
mp = cfg.get('oci', {}).get('mount_point', '/mise')
if not mp.startswith('/'): sys.exit(f'mount_point {mp!r} must be absolute')
print('mount_point OK:', mp)
EOF

Prevention

When it happens

Trigger: `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.

Common situations: Users trimming the leading slash by accident; configs ported from relative-path conventions; templating that strips leading slashes.

Understand the failure class

Background: Config validation failed: what "invalid value for {key}" and settings-rejection errors mean across 19 open-source libraries — this error's family across 19 libraries.

Related errors


AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17). Data as JSON: /api/errors/1d18cf48cda37eeb. Report an issue: GitHub.