Skip to content

mise oci run ​

[experimental] Build the project's image and run a command in it

Builds the image as mise oci build does, unless --image-dir names an existing layout, then loads it into podman or docker and runs the command in a container with stdin, stdout, and stderr attached. podman reads the OCI layout directly; docker receives it through docker load.

Requires mise settings experimental=true (or MISE_EXPERIMENTAL=1) and podman or docker.

Arguments ​

  • [-- CMD]… — Command and arguments to run inside the container (after --)

Flags ​

  • --engine <ENGINE> — Container engine to use; auto prefers podman and falls back to docker

    Choices: auto, podman, docker

    Default: auto

  • --from <FROM> — Base image for the build

    Overrides [oci].from and the oci.default_from setting.

  • --image-dir <IMAGE_DIR> — Use an existing OCI image layout instead of building one

    Cannot be combined with --from, --include-global, --mount-point, --no-mise, or --owner.

  • --include-global — Also package tools from the global and system configs

    See mise oci build --help for details.

  • --keep — Keep the loaded image in the engine's storage after the run

    By default, both the container (--rm) and the loaded image are removed when the command exits, so repeated mise oci run calls do not fill podman or docker storage. With --keep, the image stays under the tag mise used (mise-oci:run-* for docker, the pulled image ID for podman).

  • --mount-point <MOUNT_POINT> — Where tools install inside the image

    Overrides [oci].mount_point and the oci.default_mount_point setting.

  • --no-mise — Do not embed the running mise binary at /usr/local/bin/mise

  • --owner <UID[:GID]> — UID[:GID] to assign to every tar entry when building

    Overrides [oci].user_id and [oci].group_id. Defaults to 0:0. If GID is omitted, it defaults to UID. This affects file ownership only; [oci].user controls the image USER directive.

  • --volume <HOST:CONTAINER> — Bind-mount a host path (repeatable, HOST:CONTAINER[:MODE])

    Unlike docker run, there is no -v short form because mise uses -v for --verbose. Use --volume or --mount.

  • -e --env <KEY=VAL> — Set environment variable in the container (repeatable, KEY=VAL)

  • -i --interactive — Run interactively (pass -i to the engine)

  • -t --tty — Allocate a TTY (pass -t to the engine)

  • -w --workdir <WORKDIR> — Working directory inside the container

  • -h --help — Print help

Examples ​

Build the project's image and open bash in it

mise oci run -it -- bash

Run a one-shot command with an environment variable and a mounted directory

mise oci run -e DEBUG=1 --volume "$PWD:/work" -w /work -- npm test

Reuse a layout built earlier instead of building again

mise oci build -o ./img && mise oci run --image-dir ./img -- node -e 'console.log(process.version)'
MIT LicenseCopyright © 2026jdx.dev