Custom Images
VoidRun supports custom Docker images, allowing you to pre-configure environments with your specific dependencies, tools, and configurations. All while maintaining the signature under 200ms resume time and MicroVM isolation.How Custom Images Work
VoidRun uses a template system that maps to pre-built root filesystems. When you create a sandbox with a custom image, VoidRun:- Pulls the image (if not cached)
- Creates an isolated MicroVM with the image’s root filesystem
- Maintains the same performance characteristics as standard images
🚀 Fast Resume
Custom images maintain the same under 200ms resume time as standard images.
🔒 Full Isolation
Each sandbox runs in its own MicroVM, regardless of the base image.
📦 Docker Compatible
Use images from Docker Hub or private registries.
Available Templates
VoidRun provides several built-in templates:| Template ID | Description | Use Case |
|---|---|---|
debian | Debian-based Linux (default) | General purpose, AI/ML workloads |
ubuntu | Ubuntu-based Linux | Development, CI/CD |
node | Node.js pre-installed | JavaScript/TypeScript applications |
python | Python pre-installed | Data science, AI agents |
The default template is
debian. If you don’t specify a templateId, the sandbox will use the Debian-based image.Using a Custom Image
Specify Template at Creation
Pass thetemplateId parameter when creating a sandbox:
Python Template
Create a sandbox with Python pre-installed:Creating Custom Images
For advanced use cases, you can register custom images with the Images API:Image Caching & Performance
VoidRun caches images on the host server. The first sandbox creation with a new image may take longer as the image is pulled and prepared. Subsequent sandboxes using the same image will be fast.
How Caching Works
- First Use: Image is pulled and cached on the host (may take 10-60 seconds)
- Subsequent Uses: Image is served from cache (fast creation)
- Auto-Sleep Interaction: Sleeping sandboxes retain their image; resume is always under 200ms
Performance Characteristics
| Operation | First Use | Cached |
|---|---|---|
| Create Sandbox | 10-60s | 2-5s |
| Resume from Sleep | N/A | under 200ms |
| Execute Command | Instant | Instant |
Best Practices
Choose the Right Base Image
✅ Do
- Use
pythontemplate for Python workloads - Use
nodetemplate for JavaScript/TypeScript - Start with
debianfor maximum compatibility
❌ Don't
- Install heavy packages on every sandbox creation
- Use oversized images when a minimal one works
- Re-create sandboxes unnecessarily
Image Selection Guide
| Use Case | Recommended Template | Why |
|---|---|---|
| AI/ML Development | python | Python pre-installed, pip ready |
| Web Services | node | Node.js runtime ready |
| General Scripts | debian | Minimal, flexible |
| CI/CD Pipelines | debian or ubuntu | Full Linux environment |
Environment Variables
Set environment variables when creating sandboxes with custom images:Next Steps
Package Management
Install packages dynamically at runtime.
Code Execution
Execute code in your custom environment.