msb run
Create a sandbox and optionally run a command. Without--name, the sandbox is ephemeral and removed when the command finishes. With --name, it persists for later use.
| Flag | Description |
|---|---|
--name, -n | Sandbox name (if omitted, sandbox is ephemeral) |
-c, --cpus | Number of vCPUs |
-m, --memory | Memory (e.g., 512, 1G, 2G) |
-v, --volume | Volume mount (host:guest or name:guest) |
-p, --port | Port mapping (host:guest) |
-e, --env | Environment variable (KEY=VALUE) |
-w, --workdir | Working directory inside the sandbox |
--shell | Default shell |
-d, --detach | Run in background |
--rm | Remove sandbox on exit (default for unnamed) |
--secret | Bind a secret (NAME reads from env, or NAME=VALUE) |
--network | Network policy (none, public, allowlist, denylist) |
--allow | Allow egress to host (use with --network) |
--deny | Deny egress to host (use with --network) |
-q, --quiet | Suppress non-essential output |
-- command is given, the image’s entrypoint and cmd are used as the default process. If the image has neither, an interactive shell is started. When a command is given via --, it replaces the image cmd but the entrypoint is preserved. See Image config inheritance for details.
msb create
Create and boot a sandbox without running a command. Takes the same flags asmsb run.
| Flag | Description |
|---|---|
--force | Replace existing sandbox with same name |
msb start
Resume a stopped sandbox.msb stop
msb exec
Execute a command inside a running sandbox.| Flag | Description |
|---|---|
-i, --interactive | Keep stdin open |
-t, --tty | Allocate a pseudo-TTY |
-e, --env | Set environment variables |
--workdir | Override working directory |
msb shell
Open an interactive shell session.msb attach
Attach your terminal to the sandbox’s main process. PressCtrl+] to detach without stopping.