DEV Community

Alex Spinov
Alex Spinov

Posted on

Depot Has a Free API — Here's How to Build Docker Images 40x Faster

A team lead told me: 'Our Docker builds took 18 minutes in GitHub Actions. Developers lost focus waiting. We switched to Depot — same Dockerfile, 28 seconds.' That's not a typo. 18 minutes → 28 seconds.

What Depot Offers for Free

Depot free tier:

  • 100 build minutes/month
  • Shared cache — persistent build cache between runs
  • Native multi-platform — build arm64 + amd64 simultaneously
  • Drop-in replacement — works with existing Dockerfiles
  • CI/CD integration — GitHub Actions, GitLab CI, CircleCI
  • No emulation — native arm64 builders (not QEMU)

Quick Start

# Install CLI
curl -L https://depot.dev/install-cli.sh | sh

# Login
depot login

# Build (drop-in docker build replacement)
depot build -t myapp:latest .

# Multi-platform build
depot build --platform linux/amd64,linux/arm64 -t myapp:latest .

# Push to registry
depot build -t ghcr.io/myorg/myapp:latest --push .
Enter fullscreen mode Exit fullscreen mode

GitHub Actions

name: Build and Push
on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: depot/setup-action@v1
      - uses: depot/build-push-action@v1
        with:
          context: .
          push: true
          tags: ghcr.io/myorg/myapp:${{ github.sha }}
          platforms: linux/amd64,linux/arm64
Enter fullscreen mode Exit fullscreen mode

Why It's Fast

Traditional Docker build in CI:
1. Start fresh VM (no cache)          → 0:00
2. Pull base image                     → 0:30
3. Install apt packages                → 3:00
4. Install npm dependencies            → 5:00
5. Build application                   → 8:00
6. Build arm64 via QEMU (emulated)     → 18:00
Total: 18 minutes

Depot:
1. Use persistent builder (warmed up)  → 0:00
2. Cache hit: base image layers        → 0:02
3. Cache hit: apt + npm layers         → 0:05
4. Build only changed layers           → 0:20
5. Native arm64 builder (no QEMU)      → 0:28
Total: 28 seconds
Enter fullscreen mode Exit fullscreen mode

REST API

# List projects
curl 'https://depot.dev/api/v1/projects' \
  -H 'Authorization: Bearer YOUR_API_TOKEN'

# List builds
curl 'https://depot.dev/api/v1/projects/PROJECT_ID/builds' \
  -H 'Authorization: Bearer YOUR_API_TOKEN'

# Get build details
curl 'https://depot.dev/api/v1/builds/BUILD_ID' \
  -H 'Authorization: Bearer YOUR_API_TOKEN'
Enter fullscreen mode Exit fullscreen mode

Depot vs GitHub Actions Docker Build

Depot GitHub Actions
Persistent cache Cache lost each run
Native arm64 QEMU emulation (10x slower)
Dedicated builders Shared runners
28s average 18min average
$0 (free tier) Free but slow

Need to containerize scrapers? Check out my web scraping actors on Apify — no Docker needed.

Need faster CI/CD? Email me at spinov001@gmail.com.

Top comments (0)