Overview
Dokrypt orchestrates Docker containers for every chain and service. Understanding the container architecture helps with debugging, customization, and advanced configurations.Container Architecture
When you rundokrypt up, Dokrypt:
- Creates a Docker network —
dokrypt-{project-name}for inter-container communication - Starts chain containers — Each chain runs in its own container (Anvil, Hardhat, or Geth)
- Starts service containers — IPFS, explorers, oracles, etc. in dependency order
- Runs health checks — Waits for all containers to report healthy
- Saves state — Container IDs and ports saved to
~/.dokrypt/state/
Container Runtime
Dokrypt supports Docker and Podman:Runtime Requirements
Docker Images
Chain Images
Service Images
Running Dokrypt in Docker
Dokrypt itself can run as a Docker container:Dockerfile.cli
Custom Service Images
Usetype: custom to run any Docker image:
Build from Dockerfile
Container Labels
Dokrypt labels all containers with:Networking
Environment Network
All containers share a Docker bridge network nameddokrypt-{project}. Containers can reach each other by service name:
localhost with the mapped ports:
Volumes
Services can mount volumes for persistent data:Debugging Containers
View logs
Execute commands inside a container
Inspect container directly with Docker
Resource Limits
Container resource limits can be set through the container runtime configuration. TheContainerConfig supports:
These are configured programmatically through the container runtime interface and can be set via custom service configurations.