Docker images for tangle agent with official CLI tools and SDKs automatically installed from each project's documentation.
# Generate Dockerfiles from config
node generate_docker.js solana ethereum sui
# Build all dependencies and images
./build.sh all
# Or build selectively
./build.sh base # Base system (required first)
./build.sh intermediate rust # Rust toolchain (for Rust projects)
./build.sh infra solana # Solana with official CLI tools
./build.sh infra ethereum # Ethereum with ethers/viemBuilt images include:
- Solana: Official installer (Solana CLI + Anchor + NVM)
- Sui: Built from MystenLabs source
- Aptos: Built from Aptos Labs source
- RISC Zero: zkVM toolchain via cargo-risczero
- Succinct SP1: Official sp1up installer
- All others with their respective official tools
┌─────────────────────────────────────────────┐
│ Infrastructure Layer │
│ Official CLIs, SDKs, and toolchains │
├─────────────────────────────────────────────┤
│ Rust Layer (optional) │
│ rustc, cargo, rustup │
├─────────────────────────────────────────────┤
│ Base System │
│ Ubuntu 24.04 + Node.js 22 + Python 3 │
└─────────────────────────────────────────────┘
Base System (base-system:latest)
Ubuntu 24.04 with Node.js 22, Python 3, and build tools. Used by all projects.
Rust Layer (rust:latest)
Adds Rust toolchain for blockchain projects. Optional - only used when needed.
Infrastructure Layer ({project}:latest)
Project-specific installations using official methods from their documentation.
| Category | Projects | Official Tools Installed |
|---|---|---|
| Blockchains | solana, sui, aptos, ethereum, polygon, zksync, injective, tangle, stylus | CLIs, SDKs, toolchains |
| ZK Proofs | risc0, succinct, brevis | zkVM toolchains |
| Infrastructure | reth, rindexer | Ethereum client, indexer |
| APIs & DBs | coinbase, mongodb, postgresql, convex | SDK packages |
# Single or multiple projects
node generate_docker.js ethereum
node generate_docker.js ethereum solana coinbase
# Combined image (must share same base layer)
node generate_docker.js ethereum_polygon_zksyncNote: Combined projects are automatically sorted alphabetically.
# Build everything (recommended)
./build.sh all
# Build selectively
./build.sh base # Ubuntu + Node.js + Python (required first)
./build.sh intermediate rust # Adds Rust (required for Rust projects)
./build.sh infra solana # Project with official toolsBuild order matters: base → intermediate (if needed) → infra
All projects are defined in config.json with official installation methods:
{
"projects": {
"ethereum": {
"base": "base-system",
"packages": {
"npm": ["ethers", "viem", "@wagmi/core"]
}
},
"stylus": {
"base": "rust",
"packages": {
"cargo": ["cargo-stylus"]
}
}
}
}For projects requiring official installers or build-from-source:
{
"projects": {
"solana": {
"base": "rust",
"packages": { "cargo": [] },
"custom_install": {
"env": {
"SOLANA_HOME": "/root/.local/share/solana",
"PATH": "/root/.local/share/solana/install/active_release/bin:$PATH"
},
"apt_packages": ["libudev-dev"],
"root_commands": [
"curl --proto '=https' --tlsv1.2 -sSfL https://solana-install.solana.workers.dev | bash",
"/root/.local/share/solana/install/active_release/bin/solana --version"
]
}
}
}
}Options:
env: Environment variables to setapt_packages: System dependencies to installroot_commands: Commands run as root usercommands: Commands run as project user
This ensures all installations match official documentation exactly.
- Add to
config.json:
{
"projects": {
"myproject": {
"base": "base-system", // or "rust" for Rust projects
"packages": { "npm": ["my-package"] }
}
}
}- Generate and build:
node generate_docker.js myproject
./build.sh infra myprojectFor official installers, use custom_install (see Configuration section above).
# Test Dockerfile generation
node generate_docker.test.js
# Validate package names
node validate.js
# Full validation with builds
node validate.js --fullbase/
base-system.Dockerfile # Ubuntu + Node.js + Python
intermediate/
rust.Dockerfile # Rust toolchain
infra/
ethereum.Dockerfile # Generated project images
solana.Dockerfile
...
config.json # Project definitions
generate_docker.js # Dockerfile generator
build.sh # Build script