Back to browse
GitHub Repository

Self-hosted remote Docker build machine on AWS EC2

1 starsGo

Forja – Remote Docker Builders on AWS

by noqcks·Mar 10, 2026·1 point·2 comments

AI Analysis

●●SolidSolve My ProblemShip It

Ephemeral EC2 builders with mTLS beats GitHub Actions for cost control.

Strengths
  • Per-build ephemeral instances with automatic self-termination for security.
  • BuildKit cache in S3 persists across ephemeral machines.
  • Pay only for actual compute time — no always-on builder costs.
Weaknesses
  • Requires AWS setup and IAM configuration — not zero-config.
  • Cold start latency (~30s) may not suit rapid iteration workflows.
Target Audience

Developers with slow local Docker builds, especially on Mac

Similar To

GitHub Actions · Buildkite · AWS CodeBuild

Post Description

Hello HN. I got sick of docker builds on my mac taking forever, so I built forja.

Forja is an ephemeral Docker builder that runs entirely in your own AWS account. It spins up real EC2 instances for each build (`c7a` for AMD64, `c7g` for ARM), builds your image with BuildKit, pushes cache layers to S3, and then tears the machine down.

Here’s how it works: - The CLI asks AWS for a fresh EC2 instance with a pre-baked AMI (boots in ~5 seconds, ready to build in ~30). - It sets up mutual TLS on the fly: for each build it creates a short-lived CA, issues client/server certs, drops them in S3, and both sides mutually auth before any data moves. - BuildKit runs on the remote box, pulls/pushes cache layers to S3 so future builds stay fast even though every machine is ephemeral. - When the build finishes or fails—or even if you Ctrl+C—the instance self-terminates and the certs disappear with it.

Let me know what you think!

Cheers, Benji

Similar Projects