Minibox Compose gives every container in a project an automatic, zero-configuration hostname based on its service name. There is no embedded DNS server — instead, the daemon writes a customDocumentation 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.
/etc/hosts file into each container’s rootfs before PID 1 starts, mapping every sibling service name to its assigned IP address.
How /etc/hosts Injection Works
When a container starts as part of a Compose project the daemon follows these steps:Allocate a container IP
Each container is assigned a private IP address in the
172.19.0.x subnet, allocated from the minibox0 bridge.Query sibling container state
The daemon reads the runtime
state.json to find all other containers that share the same project name and are currently running.Generate the hosts file
A hosts file is constructed that maps every service name (and container ID short-form) to its IP address, alongside the standard
localhost entries.IP Address Assignment
All Minibox containers share the172.19.0.0/24 address space managed by the minibox0 bridge:
| Address | Role |
|---|---|
172.19.0.1 | minibox0 bridge (host gateway) |
172.19.0.2 | First container allocated |
172.19.0.3 | Second container allocated |
172.19.0.x | Subsequent containers |
MINIBOX_BRIDGE_ON_STARTUP=0).
Example Hosts File
For a project namedshop with services db, cache, and api, the hosts file injected into the api container would look like:
db can also reach api by name.
Connection String Examples
Because service names resolve as hostnames, your application code connects to siblings exactly the same way it would connect to a named host on any network.- Node.js
- Python
- Go
Persistent Volumes with db_mode
Database services commonly need data to survivecompose down / compose up cycles. Setting db_mode: true together with a data path tells Compose to provision a named persistent volume that is reused across runs.
DataRoot/volumes/<project>-<service>-data on the host. Because it lives outside the container’s overlay filesystem, its contents survive container removal.
Limitations
Keep these constraints in mind when designing your service topology.
- Static injection — hosts entries are written once at container start. If a sibling container is replaced (e.g.
compose restartof one service), already-running containers will continue to resolve the old IP until they are restarted too. Usecompose restarton the whole project to refresh all entries. - Same-project scope — service name resolution only works within a single Compose project. Containers from different projects cannot reach each other by service name.
172.19.0.0/24capacity — the subnet supports up to 253 containers. Projects larger than this are not currently supported.- No SRV or port records — only A-record-style hostname-to-IP mappings are injected. Port information must be encoded in connection strings by the application.