DockBridge – Run Docker on cheap cloud servers, pay only when you use it

4 pointsposted 14 hours ago
by FunShot

4 Comments

nateb2022

11 hours ago

https://stopslopware.net/

Your comment is AI-generated. Your entire README.md is AI generated. Your project structure is a mess, multiple overlapping packages. You declare a pkg/logger package, and yet tons of other code uses a bare stdlib log.Logger.

It looks like none of your CI tests have passed a single commit.

You have an install.sh script that attempts to download an artifact from a non-existent repo dockbridge/dockbridge.

You're binding to 0.0.0.0, so someone with a public IP will have an exposed docker daemon. You claim security but "Implement proper host key verification" is a TODO item: https://github.com/Max-Levitskiy/DockBridge/blob/23d164232b8...

FunShot

2 hours ago

Yep, the project is completely AI generated. I don't hide it. You can see the specs that I used initially for this project. And it was generated by multiple different AI tools. As it's just a small tool I've created for myself, and share with others. :) It's not a thing I'm selling here. So, yep, it's not something with super high quality, especially from the code perspective. I know it. :)

And thanks for your comment. I'll apply your recommendations. ;) Or feel free to open a PR, if you want. I'll be grateful.

For me, it's a tool I created because I'm often running stuff with docker, it takes a lot of memory. And additional memory on macs costs too much. :D

FunShot

an hour ago

oh, yep... About that "insecure", it's implemented because the instances are dropped, when inactive. And after the reprovisioning, new instance on Hetzner very often has the same IP. But other key. So, it's more or less expected behavior, that you have same ip with different keys. It could be an improvement later in this area. But it's not the most critical stuff.

FunShot

14 hours ago

Hello HN!

I built DockBridge to solve a frustration I've had for years: Docker on macOS is heavy, but cloud dev servers are expensive (and annoying to manage).

The Problem If you're on a Mac (especially Apple Silicon) or Windows: 1. Local Docker: Drains battery, spins fans, uses 10s of GBs of disk, and cross-arch builds (amd64) are painfully slow via emulation. 2. Remote Docker: You buy a VPS ($20-50/mo), set up SSH/Docker context. But you have to manage it, secure it, and you pay for it 24/7 even if you only build once a day.

The Solution: Ephemeral, Persistent, Auto-Scaling (in future) DockBridge allows you to point your local Docker client at a cheap cloud server that only exists when you need it.

1. Run: `export DOCKER_HOST=unix:///tmp/dockbridge.sock` 2. Use: Run `docker build .` or `docker run ...` locally. 3. Magic: DockBridge sees the request. If no server exists, it calls the cloud API (currently Hetzner) and provisions one (~60s). 4. Connect: It tunnels traffic via SSH. 5. Sleep: When you stop using it, DockBridge detects idleness and destroys the compute instance. 6. Persist: It uses persistent block storage for `/var/lib/docker`. When the server comes back up, all your images, layers, and volumes are instantly there. No re-pulling.

Cost It uses Hetzner Cloud (because it's cheap and reliable). - Compute: You pay ~$0.01/hour (CPX21: 3 vCPU, 4GB RAM) only while active. - Storage: You pay ~€0.05/month for 10GB of persistent data. - Total: For typical dev usage, it costs pennies instead of $50/mo.

Technical Details - Written in Go. - Implements a proxy for the Docker socket. - Manages strict security: generates temporary SSH keys, sets up firewalls (no open ports), uses SSH tunneling for all traffic. - Open Source: AGPL-3.0.

I'd love to hear your feedback! Specifically: - What other cloud providers would you like to see? (AWS/GCP/DigitalOcean?) - Are there other features (like sync for bind mounts) that would make this your daily driver?