Skip to main content
Lasso RPC provides a production-ready Dockerfile for containerized deployments. The Docker setup uses multi-stage builds for optimized image size and includes all necessary runtime dependencies.

Quick Start

The fastest way to run Lasso RPC with Docker:
1

Run the Docker script

This script automatically:
  • Validates Docker is installed and running
  • Builds the image as lasso-rpc
  • Generates a SECRET_KEY_BASE if not set
  • Starts the container with port 4000 exposed
2

Access the dashboard

Open your browser to:

Dockerfile Architecture

The Dockerfile uses a two-stage build for optimal image size:

Build Stage

Runtime Stage

Manual Docker Commands

Building the Image

Build with custom tag:

Running the Container

Basic run with required environment variables:
Run with custom port:

Environment Variables

Required for Production

Optional Configuration

Provider API Keys

Pass provider API keys as environment variables:
These are referenced in profile YAML files using ${ENV_VAR} syntax:

Volume Mounts

Custom Profiles

Mount a custom profiles directory:

Persistent Data Directory

Use LASSO_DATA_DIR to persist profile modifications:
The entrypoint script automatically seeds default profiles to /data/config/profiles on first run.

Docker Compose

Example docker-compose.yml:
Run with:

Health Checks

The health endpoint is available at /api/health:
Configure Docker health checks:

Container Registry

Push to a container registry:

Entrypoint Script

The container uses /app/entrypoint.sh to handle initialization:
This enables:
  • Automatic profile seeding on first run
  • Persistent profile storage with volume mounts
  • Foreground process execution for container lifecycle

Next Steps