microagent rootfs
microagent rootfs build --image <ref> --out <path> [flags]rootfs build pulls an OCI image and writes an ext4 disk image. Use it when
you want to prepare a rootfs ahead of time or hand it to a workspace via
--rootfs.
Subcommands
Section titled “Subcommands”build— build a rootfs from an OCI image
build flags
Section titled “build flags”| Flag | Description |
|---|---|
--image <ref> | OCI image reference |
--out <path> | Output rootfs path |
--os <os> | Target OS (default linux) |
--arch <arch> | Target architecture (amd64, arm64) |
--size-mib <MiB> | Disk size |
--mke2fs <path> | mke2fs binary path |
--exec <command> | Shell command to run as guest init |
--allow-mutable | Allow tag references (image without a digest) |
By default, rootfs build only accepts images pinned by digest. Pass
--allow-mutable to accept tag references.
Example
Section titled “Example”microagent rootfs build \ --image docker.io/library/busybox@sha256:c4e5b27bf840ba1ebd5568b6b914f6926f3559b2ad4f505b1f37aae483b907d6 \ --arch arm64 \ --size-mib 64 \ --mke2fs /opt/homebrew/opt/e2fsprogs/sbin/mke2fs \ --out /tmp/busybox-rootfs.ext4Hand the result to create:
microagent create \ --id agent-1 \ --kernel /tmp/kernel \ --rootfs /tmp/busybox-rootfs.ext4 \ --state-dir /tmp/microagent-kit