Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Docker 8 min read How-to mediumAdept

Accelerate Your Docker Builds Using AWS CodeBuild and Docker Build Cloud

Offloading container image builds from AWS CodeBuild to Docker Build Cloud addresses three common CI bottlenecks: undersized build machines, no persistent layer cache in clean CI environments, and slow emulated multi-architecture builds. A buildspec.yml installs the latest Buildx, logs in to ECR and Docker with a PAT from Secrets Manager, selects a cloud builder, and runs `docker buildx build --platform linux/amd64,linux/arm64 --push` straight to ECR. On a 2 vCPU/3GB CodeBuild instance, the build dropped from 5:59 for an AMD64-only local build to 1:04 for a native AMD64+Arm64 build, using 16 vCPU/32GB builders and a 200 GiB shared cache.

Related posts

  • Powered by Docker: Streamlining Engineering Operations as a Platform Engineer

    Docker mediumAdept

    Replacing QEMU-emulated multi-architecture Docker Buildx builds with native arm64 and amd64 self-hosted GitHub Actions runners cut build times by roughly 90%, with the multi-arch manifest published after the native builds finish. The runners live on separate Kubernetes node pools provisioned with Terraform and targeted via nodeSelector. Two further changes covered operations: SemVer-tagged images allow quick ECS rollbacks, and OpenTelemetry collector sidecars plus multi-stage Node.js Dockerfiles standardize telemetry collection and auto-instrumentation. The client reports about a 50% drop in lead time and time to restore, and about a 30% reduction in MTTD and MTTR.

  • Deploying to production in <5m with our hosted container builder

    incident.io mediumAdept

    incident.io cut Docker image build times from an inconsistent 3–10+ minutes back to under 2 minutes by replacing CircleCI's remote Docker and Docker Layer Caching with a permanently running GCP c2-standard-8 builder with a 500GB SSD. The slow builds came from CircleCI's DLC attaching a cache disk only when one is free, so concurrent builds often started with a cold layer cache. Larger CircleCI resource classes added minutes of provisioning time. CircleCI jobs now reach the dedicated daemon over SSH via DOCKER_HOST. Measured builds take 20s with no changes and about 1m50s when both the Go backend and React frontend change, for roughly £350/month.

  • Why Testcontainers Cloud Is a Game-Changer Compared to Docker-in-Docker for Testing Scenarios

    Docker mediumAdept

    Docker-in-Docker, commonly used to give CI jobs a Docker daemon for Testcontainers integration tests, requires privileged mode and nests storage drivers, cgroups and namespaces, which leads to security audit problems, flaky builds, slow pipelines and hard debugging. Testcontainers Cloud offloads container execution to a cloud service through an agent, removing the need for privileged containers or a local Docker socket. Setup in GitHub Actions takes a service-account token stored as TC_CLOUD_TOKEN and the atomicjar/testcontainers-cloud-setup-action step before running tests. The claimed gains in build speed and maintenance are anecdotal and not quantified.

  • Optimizing Our E2E Pipeline

    Slack Engineering mediumAdept

    Slack cut redundant frontend builds in its monorepo E2E pipeline by using `git diff` three-dot notation against `main` to detect whether a PR touches frontend code, and when it doesn't, serving a recent production frontend build from S3 through an internal CDN instead of rebuilding. The check and artifact lookup take under 3 seconds across 100,000+ tracked files. Frontend build frequency dropped 60%, average build time fell from ~5 to ~2 minutes (from ~10 minutes at the start of the year, counting an earlier Webpack upgrade), several terabytes of monthly S3 storage were saved, and E2E test flakiness reached its lowest measured level.

  • Counting to 3 with a new builder processing 50M+ monthly builds

    Railway mediumAdept

    Railway replaced its docker-buildx-on-GCP-VMs build system with Builder v3: 256-vCPU bare-metal hosts split into eight 32-vCPU microVM build cells running buildkitd, scheduled with a 1-of-3 ring to keep BuildKit caches warm, now peaking at 66,000 builds per hour. Collapsing a host/guest split (workflow → gRPC over vsock → guest handler) into one standalone builder process cut about 20 seconds from cached builds. Rollout problems included VM bridge networking failures that forced a rollback, unreliable DNS (fixed with embedded CoreDNS), clock drift breaking cert validation, and stuck builds from runc workers starving buildkitd, fixed with cgroup v2 slices. Reading layer metadata from OCI manifests instead of decompressing layers was about 15× faster and saved roughly 10 seconds per build.

The quest for software engineering knowledge.

Look:
Layout: