These commands cover the full container lifecycle: checking daemon health, building images, running containers, inspecting them, executing commands inside, and tearing them down. All commands communicate withDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/chaitu426/minibox/llms.txt
Use this file to discover all available pages before exploring further.
miniboxd over HTTP.
ping
Check that the daemon is reachable and responding.Daemon is running
ping is the only command you can safely run when the daemon is not yet started — it simply tells you whether it is up. A connection error means miniboxd is not running or MINIBOX_API points to the wrong address.build
Build an OCI-compatible image from a directory containing aMiniBox file.
. (current directory) when omitted.
Image name (tag) to assign to the built image. Used to reference the image in
run, rmi, save, etc.Path to the build context. The directory must contain a
MiniBox file. The daemon validates this path against MINIBOX_BUILD_PREFIXES.Health check support
MiniBox files support a basicHEALTHCHECK directive:
mini.healthcheck.cmd, mini.healthcheck.interval) and surfaced as starting, healthy, or unhealthy in the HEALTH column of ps.
run
Run a command in a new container from a local image.Detached mode. The container starts in the background; only the container ID is printed to stdout.
Memory limit in megabytes. Written to the container cgroup’s
memory.max.CPU quota limit in cgroup v2
cpu.max format (e.g. 50000 for 50% of one CPU).Port mapping in
host:container format (e.g. -p 8080:80). Repeat the flag for multiple mappings. The daemon programs iptables DNAT rules for each mapping.Name of a locally built image (as tagged with
minibox build -t).Override the image default command. If the image has an
Entrypoint, the provided command is appended to it. If omitted, the image’s Entrypoint + CMD is used.ps
List containers managed by the daemon.Include stopped and exited containers. Without
-a, only running containers are shown.Output the container list as JSON instead of the default table.
ID, IMAGE, COMMAND, STATUS, HEALTH, EXIT, PORTS, CREATED.
logs
Fetch the stdout/stderr log for a container.The 8-character hex container ID returned by
run or ps.DataRoot/containers/<id>/container.log and served as plain text.
exec
Run a command inside a running container by entering its Linux namespaces.Attach stdin, stdout, and stderr to your terminal for interactive use. Requires
nsenter from util-linux to be installed on the host.The 8-character hex ID of a running container.
Command and arguments to execute inside the container’s namespaces.
exec requires the container to be in running status. It uses nsenter to enter the container’s PID, mount, UTS, and network namespaces.stop
Stop a running container gracefully by sending SIGTERM, then SIGKILL if the timeout expires.Timeout in seconds to wait after SIGTERM before sending SIGKILL.
The 8-character hex ID of a running container.
kill
Force-kill a container immediately with SIGKILL.The 8-character hex ID of a running container.
137 (128 + SIGKILL signal number 9).
rm
Remove a stopped container: deletes its state entry and its directory underDataRoot/containers/<id>/.
The 8-character hex container ID to remove.
stats
Display live cgroup resource stats for a running container. Refreshes once per second. Press Ctrl+C to exit.The 8-character hex ID of a running container.
db run
Run a database container with production-friendly defaults.db run is a superset of run that configures the container for database workloads: persistent named volumes, larger /dev/shm, higher I/O priority, and OOM protection.
Named volume ID. The volume is stored at
DataRoot/volumes/<name>-data and survives container restarts.Container path where the named volume is mounted.
Size of
/dev/shm in megabytes. Postgres needs ≥128; MongoDB benefits from ≥256.Port mapping in
host:container format. Repeat for multiple ports.Environment variable in
KEY=VALUE format. Repeat for multiple variables.Shell command string. Executed as
/bin/sh -c <cmd> when no positional command arguments are given.Always detached (accepted for symmetry with
run; db run is always detached).What db run configures differently
| Setting | Value | Purpose |
|---|---|---|
db_mode | true | Skips capability drop so DB entrypoints can chown data directories on first boot |
/dev/shm | --shm-size MB | Postgres shared_buffers, MongoDB WiredTiger cache |
/dev/pts | devpts mount | Required by initdb and DB shell tools |
/tmp | tmpfs (mode 1777) | Used broadly by all DB engines |
/dev/ptmx, /dev/console | created | Full POSIX device coverage |
io_weight | 800 | High disk scheduling priority |
oom_score_adj | -900 | Last process to be OOM-killed |
- Postgres
- MongoDB
- Redis