Loading...
Loading...
Compare original and translation side by side
msb --versionbash scripts/setup.shmsb~/.microsandbox/bin/libkrunfw~/.microsandbox/lib/msb --versionbash scripts/setup.shmsb~/.microsandbox/bin/libkrunfw~/.microsandbox/lib/msb run <image> [options] -- <command>msb run python:3.12 -- python -c "print('hello from sandbox')"
msb run -m 1G node:22 -- node -e "console.log(process.version)"
msb run alpine:latest -- sh -c "uname -a && cat /etc/os-release"msb run <image> [options] -- <command>msb run python:3.12 -- python -c "print('hello from sandbox')"
msb run -m 1G node:22 -- node -e "console.log(process.version)"
msb run alpine:latest -- sh -c "uname -a && cat /etc/os-release"msb create --name <name> [options] <image>
msb exec <name> -- <command>
msb shell <name>
msb stop <name>
msb start <name> # Resume a stopped sandbox
msb rm <name>undefinedmsb create --name <name> [options] <image>
msb exec <name> -- <command>
msb shell <name>
msb stop <name>
msb start <name> # 恢复已停止的沙箱
msb rm <name>undefinedundefinedundefined| Flag | Description | Example |
|---|---|---|
| Name the sandbox | |
| Memory allocation | |
| Number of vCPUs | |
| Mount volume | |
| Publish port | |
| Set env variable | |
| Working directory | |
| Run in background (run only) | |
| Run as user | |
| Set guest hostname | |
| Default shell program | |
| Replace existing sandbox | |
| Override entrypoint | |
| Pull policy | |
| Auto-stop timeout | |
| Idle auto-stop | |
| Mount tmpfs | |
| Inject script | |
| 参数 | 描述 | 示例 |
|---|---|---|
| 为沙箱命名 | |
| 内存分配 | |
| vCPU数量 | |
| 挂载卷 | |
| 发布端口 | |
| 设置环境变量 | |
| 工作目录 | |
| 后台运行(仅适用于run命令) | |
| 指定运行用户 | |
| 设置沙箱主机名 | |
| 默认Shell程序 | |
| 替换已存在的沙箱 | |
| 覆盖镜像入口点 | |
| 镜像拉取策略 | |
| 自动停止超时时间 | |
| 空闲自动停止超时 | |
| 挂载tmpfs | |
| 注入脚本 | |
msb ls # List all sandboxes
msb ls --running # Running only
msb ps # Show running sandboxes with status
msb ps -a # All sandboxes including stopped
msb inspect <name> # Detailed sandbox info
msb metrics <name> # Live CPU/memory/IO stats
msb stop <name> # Graceful shutdown
msb stop --force <name> # Force kill
msb stop -t 10 <name> # Wait 10s then force kill
msb rm <name> # Remove stopped sandbox
msb rm --force <name> # Stop and remove in one stepmsb ls # 列出所有沙箱
msb ls --running # 仅列出运行中的沙箱
msb ps # 显示运行中沙箱的状态
msb ps -a # 列出所有沙箱(包括已停止的)
msb inspect <name> # 查看沙箱详细信息
msb metrics <name> # 查看实时CPU/内存/IO统计
msb stop <name> # 优雅关闭沙箱
msb stop --force <name> # 强制终止沙箱
msb stop -t 10 <name> # 等待10秒后强制终止
msb rm <name> # 删除已停止的沙箱
msb rm --force <name> # 一步完成停止并删除沙箱msb pull <image> # Pre-cache an OCI image
msb images # List cached images (alias: msb image ls)
msb image inspect <img> # Image metadata
msb rmi <image> # Remove cached image (alias: msb image rm)msb pull <image> # 预缓存OCI镜像
msb images # 列出已缓存的镜像(别名:msb image ls)
msb image inspect <img> # 查看镜像元数据
msb rmi <image> # 删除已缓存的镜像(别名:msb image rm)msb volume create <name> # Create named volume
msb volume create <name> --size 5G # With quota
msb volume ls # List volumes
msb volume inspect <name> # Volume details
msb volume rm <name> # Remove volumemsb volume create <name> # 创建命名卷
msb volume create <name> --size 5G # 创建带配额的命名卷
msb volume ls # 列出所有卷
msb volume inspect <name> # 查看卷详细信息
msb volume rm <name> # 删除卷undefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedmsb registry login ghcr.io --username octocat
msb registry logout ghcr.io
msb registry lsmsb registry login ghcr.io --username octocat
msb registry logout ghcr.io
msb registry lsmsb install python:3.12 # Install as 'python' command
msb install --name py python:3.12 # Custom name
msb install --list # Show installed commands
msb uninstall py # Removemsb install python:3.12 # 将沙箱安装为'python'命令
msb install --name py python:3.12 # 自定义命令名称
msb install --list # 查看已安装的命令
msb uninstall py # 卸载命令msb run--namemsb createmsb run --namemsb rmmsb createmsb run -d--replace--namemsb runmsb createmsb run --namemsb rmmsb createmsb run -d--replacemsbsource ~/.bashrc # or ~/.zshrcls ~/.microsandbox/bin/msb
ls ~/.microsandbox/lib/libkrunfw*msbsource ~/.bashrc # 或 ~/.zshrcls ~/.microsandbox/bin/msb
ls ~/.microsandbox/lib/libkrunfw*