Dockdash is a Rust library for building and pushing OCI-compliant container images — without needing Docker installed. It's fast, lightweight, and works anywhere Rust runs: CI pipelines, serverless functions, CLIs, or embedded tooling.
Why Dockdash?
- No Docker daemon — build images in environments where Docker isn't available (serverless, sandboxed CI, etc.)
- Fast — native Rust performance with zstd layer compression and content-addressable blob caching
- Simple API — intuitive builder pattern to create layers, assemble images, and push to any OCI registry
- Multi-arch support — build images for
amd64,arm64, and other architectures - Layer caching — content-addressable local blob cache for fast incremental builds
- Registry push — push directly to Docker Hub, ECR, GCR, ACR, GitHub Container Registry, or any OCI-compliant registry
- Authentication — supports anonymous, basic auth, and token-based registry authentication
Quick Start
Add to your Cargo.toml:
[]
= "0.1"
= { = "1", = ["full"] }
Build and push an image:
use ;
use PathBuf;
async
Features
Layer Builder
Create layers from files or raw data:
// From a file on disk
let layer = builder?
.file?
.build
.await?;
// From raw bytes
let layer = builder?
.data?
.build
.await?;
// Multiple files in one layer
let layer = builder?
.file?
.file?
.data?
.build
.await?;
Image Builder
Compose images from a base and custom layers:
let = builder
.from
.platform
.layer
.layer
.entrypoint
.working_dir
.build
.await?;
Blob Caching
Speed up repeated builds with content-addressable caching:
use BlobCache;
// Default location: ~/.dockdash/cache/blobs
let cache = new?;
// Or use a custom cache directory (path is used as-is)
let cache = with_path?;
let layer = builder?
.blob_cache
.file?
.build
.await?;
let = builder
.from
.blob_cache
.layer
.build
.await?;
Registry Authentication
use ;
// Anonymous (e.g., ttl.sh)
let opts = default;
// Basic auth
let opts = PushOptions ;
// HTTP (for local registries)
let opts = PushOptions ;
Use Cases
- CI/CD pipelines — build container images without Docker-in-Docker or privileged containers
- Serverless functions — dynamically build and push images from Lambda, Cloud Functions, etc.
- CLI tools — embed container image building into your Rust CLI
- Platform tooling — build images as part of a deployment platform without requiring Docker on the host
- Edge computing — build images on resource-constrained devices
Testing
# Unit tests
# Integration tests (requires Docker for Bollard-based tests)
License
Licensed under the Apache License, Version 2.0.