Run Docker on cheap cloud servers, pay only when you use it
Why? β’ Quick Start β’ How it Works β’ Features β’ Configuration
Docker Desktop on Mac/Windows is slow and resource-hungry. Running containers locally means:
- π Slow builds on ARM Macs when targeting x86
- π Battery drain from VM overhead
- πΎ Precious SSD space consumed by images
- π Fans spinning when building large containers
Cloud dev environments are expensive. Keeping a cloud VM running 24/7:
- πΈ ~$30-50/month for a decent dev server
- π§ Manual setup and maintenance
- π¦ Losing your containers when you forget to save
DockBridge automatically provisions cloud servers that exist only when you need them.
# Point Docker at DockBridge
export DOCKER_HOST=unix:///tmp/dockbridge.sock
# Just use Docker normally - server spins up automatically
docker run hello-world # Server created in ~60s
docker build . # Fast x86 builds on x86 hardware
# Walk away - server auto-destroys when idle
# Your images and volumes persist on cheap cloud storageTypical cost: $0.01-0.05/hour (only when actually building/running containers)
| Feature | Local Docker | Cloud VM | DockBridge |
|---|---|---|---|
| Cost | Free (but slow) | $30-50/month | Pay-per-use |
| Speed | Slow on non-native arch | Fast | Fast |
| State persistence | β | Manual | β Automatic |
| Resource usage | High | None local | None local |
| Setup | Easy | Manual | Easy |
# One-liner install (Linux/macOS)
curl -fsSL https://raw.githubusercontent.com/Max-Levitskiy/DockBridge/main/install.sh | shOther installation methods
# Build from source (requires Go 1.24+)
git clone https://github.com/Max-Levitskiy/DockBridge
cd dockbridge
go build -o dockbridge ./cmd/dockbridge
sudo mv dockbridge /usr/local/bin/Create dockbridge.yaml:
hetzner:
api_token: "your-hetzner-api-token" # Get one at console.hetzner.cloud
server_type: "cpx21" # 3 vCPU, 4GB RAM (~$0.01/hr)
location: "fsn1" # Falkenstein, DE (or nbg1, hel1)
volume_size: 10 # Persistent storage in GB
docker:
socket_path: "/tmp/dockbridge.sock"
ssh:
key_path: "~/.ssh/id_rsa" # Your SSH key# Start DockBridge
./dockbridge start
# In another terminal, point Docker at it
export DOCKER_HOST=unix:///tmp/dockbridge.sock
# Use Docker as usual
docker ps
docker run -it ubuntu bash
docker build -t myapp .Your Machine Hetzner Cloud
ββββββββββββββββββββ ββββββββββββββββββββ
β β β β
β docker build . β β Docker Daemon β
β β β β β² β
β βΌ β β β β
β ββββββββββββββ β SSH Tunnel β ββββββββββββββ β
β β DockBridge ββββΌββββββββββββββββββββββΌββΆβ Docker β β
β β β β Encrypted β β Socket β β
β ββββββββββββββ β β ββββββββββββββ β
β β² β β β² β
β β β β β β
β Unix Socket β β ββββββββββββββ β
β /tmp/dockbridge β β β Persistent β β
β β β β Volume β β
ββββββββββββββββββββ ββββ΄βββββββββββββ΄βββ
1. You run `docker build`
2. DockBridge sees activity β provisions server (if needed)
3. SSH tunnel forwards commands to remote Docker
4. Server auto-destroys after idle timeout
5. Volume persists your images & data
- On-demand provisioning: Servers created when you run Docker commands
- Auto-shutdown: Servers destroyed after configurable idle time
- Instant resume: Volume persists, so images are still there next time
- All images, containers, and volumes survive server destruction
- Uses Hetzner's cheap block storage (~β¬0.04/GB/month)
- No more "pulling all images again" on restart
- All traffic encrypted via SSH tunnel
- No exposed ports on cloud server
- Uses your existing SSH keys
- Pay only for compute time you use
- Automatic idle detection
- Real-time cost tracking with
dockbridge status
# Start the proxy (required before using Docker)
dockbridge start [--daemon] [--socket /path/to/socket]
# Check current status, server info, and costs
dockbridge status [--json] [--watch]
# Stop and destroy the server
dockbridge stop [--force]| Setting | Description | Default |
|---|---|---|
hetzner.api_token |
Hetzner Cloud API token | Required |
hetzner.server_type |
Server type (cpx11, cpx21, cpx31, etc.) | cpx21 |
hetzner.location |
Datacenter (fsn1, nbg1, hel1, ash, hil) | fsn1 |
hetzner.volume_size |
Persistent volume size in GB | 10 |
docker.socket_path |
Local Unix socket path | /tmp/dockbridge.sock |
ssh.key_path |
Path to SSH private key | ~/.ssh/id_rsa |
ssh.timeout |
SSH connection timeout | 10s |
| Type | vCPU | RAM | Price/hr |
|---|---|---|---|
| cpx11 | 2 | 2GB | ~$0.006 |
| cpx21 | 3 | 4GB | ~$0.010 |
| cpx31 | 4 | 8GB | ~$0.017 |
| cpx41 | 8 | 16GB | ~$0.033 |
| cpx51 | 16 | 32GB | ~$0.066 |
Hetzner offers the best price-to-performance ratio for cloud servers in Europe/US:
- ~3x cheaper than AWS/GCP/Azure for equivalent specs
- Excellent x86 performance for Docker builds
- Simple, developer-friendly API
- Block storage for persistent volumes
π Sign up for Hetzner Cloud and get β¬20 free credit to try DockBridge!
DockBridge creates a persistent block volume that mounts at /var/lib/docker. When a server is destroyed, the volume remains. When a new server is provisioned, it reattaches the same volume, restoring all your images, containers, and volumes.
When the server is destroyed, running containers stop. On next use, the server is reprovisioned and you can restart your containers. Use docker-compose up -d or similar for easy restart.
DockBridge is designed for development use. The auto-destroy feature means you shouldn't run production workloads. For production, use proper orchestration (Kubernetes, Docker Swarm, etc.).
Currently only Hetzner is supported. AWS/GCP/Azure support is planned. PRs welcome!
# Clone
git clone https://github.com/Max-Levitskiy/DockBridge
cd dockbridge
# Run tests
go test ./...
# Build
go build -o dockbridge ./cmd/dockbridge
# Run with debug logging
DOCKBRIDGE_DEBUG=1 ./dockbridge startContributions are welcome! Please see our contributing guidelines.
Key areas for contribution:
- Support for additional cloud providers (AWS, GCP, Azure)
- Windows support
- Improved idle detection
- Cost prediction and alerts
AGPL-3.0 - See LICENSE
Built with β for developers who want fast Docker builds without the VM overhead