Skip to main content
Dagger provides containerized sandboxes that run locally on your machine using Docker and the Dagger engine. This enables fast, offline development with complete isolation and control. Perfect for local development, testing, and when you need the speed of local execution with the isolation of containers. Learn more about Dagger here.

Installation

First, install the Dagger CLI on your system: macOS:
Linux:
Windows:
Then install the Dagger provider package:
Verify installation:

Configuration

VibeKit uses a builder pattern with method chaining for type safety and flexibility. Configure your Dagger provider and VibeKit instance: Dagger supports multiple container registries for storing and sharing pre-built agent images. Choose the registry that best fits your infrastructure and security requirements.

Default Configuration (Docker Hub)

Using GitHub Container Registry

GitHub Container Registry provides seamless integration with GitHub workflows:
Setting up GHCR:

Using AWS ECR

AWS Elastic Container Registry for enterprise AWS deployments:
Setting up AWS ECR:

Quick Setup

Initialize with automatic dependency installation:
The setup will:
  • Install Docker and Dagger CLI if needed
  • Pre-build agent images for faster startup
  • Optionally upload optimized images to your chosen registry
  • Configure registry authentication

ENV variables and secrets

Configure your Dagger provider using environment variables:
Reference them in your code:

Configuration Options

The createLocalProvider function accepts these configuration options:
  • preferRegistryImages (optional): Use pre-built registry images for faster startup (default: true)
  • registryUser (optional): Registry username for pulling/pushing custom images (works with any registry)
  • registryName (optional): Which registry to use - supported values:
    • "dockerhub" - Docker Hub (default)
    • "ghcr" - GitHub Container Registry
    • "ecr" - AWS Elastic Container Registry
  • dockerHubUser (optional, deprecated): Legacy Docker Hub username - use registryUser instead
  • privateRegistry (optional): Alternative registry URL for enterprise setups
  • pushImages (optional): Automatically push built images to registry (default: true)
  • autoInstall (optional): Automatically install missing dependencies (default: false)
  • retryAttempts (optional): Number of retry attempts for registry operations (default: 3)
  • retryDelayMs (optional): Delay between retry attempts in milliseconds (default: 1000)

Unique Features

Local Execution

  • No internet required - Everything runs on your machine
  • Zero usage fees - No per-minute or per-execution costs
  • Offline development - Work without network connectivity

Performance Optimization

  • Local execution - No network latency for container operations
  • Multi-registry support - Choose the best registry for your infrastructure:
    • Docker Hub - Public registry, easy sharing
    • GitHub Container Registry - Integrated with GitHub workflows
    • AWS ECR - Enterprise AWS deployments
  • Automatic image caching - Reuse images across sessions
  • Registry fallback - Automatically falls back to local builds if registry is unavailable

Registry Architecture

VibeKit’s Dagger provider supports multiple container registries through a flexible factory pattern:

Registry Selection

The registry is selected based on the registryName configuration:
  • dockerhub (default) - Public Docker Hub registry
  • ghcr - GitHub Container Registry (requires GitHub token)
  • ecr - AWS Elastic Container Registry (requires AWS credentials)

Image Resolution Strategy

  1. Check local cache - Look for existing Docker images locally
  2. Pull from registry - Attempt to pull pre-built images from configured registry
  3. Build from Dockerfile - Fall back to building from source if needed

Migration Guide

If you’re upgrading from an older version that only supported Docker Hub:
The dockerHubUser field is maintained for backward compatibility but registryUser is now the recommended universal field that works with all registries.

System Requirements

  • Docker - Container runtime (automatically installed during setup)
  • Dagger CLI - Container orchestration engine (automatically installed during setup)
  • Node.js 18+ - Runtime environment
  • 8GB RAM recommended - For running multiple containers
  • Registry-specific requirements:
    • GitHub Container Registry: GitHub account with packages:write permission
    • AWS ECR: AWS account with ECR permissions and configured AWS CLI

Troubleshooting

Docker not running:
Dagger CLI not found:
Registry authentication issues:
Permission errors (Linux):
Registry image not found: