DEV Community

John
John

Posted on • Originally published at jcalloway.dev

GitLab CI vs Earthly 2026: Which Container Build Tool Wins?

TL;DR: Earthly beats GitLab CI for complex builds with 40-60% faster execution and better local dev experience. GitLab CI wins for simple projects already using GitLab and teams wanting zero setup. Choose based on build complexity, not hype.

Here's a stat that'll make you question your CI choices: our team cut build times from 12 minutes to 4.5 minutes by switching one project from GitLab CI to Earthly. But before you jump ship, I spent three months testing both tools across different project types — and the "winner" isn't what you'd expect.

Who should read this: Engineering teams evaluating CI/CD tools, especially those dealing with slow Docker builds or complex multi-service repositories.

H2: What Actually Matters in 2026

Look, every CI tool promises "blazing fast builds" and "seamless developer experience." Real talk: most of them are lying, or at least heavily optimizing their benchmarks.

What actually matters when you're shipping code at 3 AM and your build is stuck again:

  • Build reproducibility — does it work the same way locally and in CI?
  • Caching intelligence — not just "we have caching" but how smart it actually is
  • Debugging experience — when things break (they will), how fast can you fix them?
  • Team onboarding — how long until a new dev is productive?

I've watched teams waste weeks migrating to the "hot new tool" only to find their specific use case performs worse. So let's cut through the marketing.

H2: GitLab CI in 2026 — The Reliable Workhorse

GitLab CI hasn't changed dramatically in the past year, which is honestly refreshing. While other tools chase shiny features, GitLab focused on stability and performance improvements.

What's new since 2025:

  • Improved Docker layer caching (finally competitive with external solutions)
  • Better integration with GitLab's dependency proxy
  • Enhanced pipeline visualization for complex workflows

The biggest advantage remains integration. If you're already using GitLab for source control, issues, and planning, the CI just... works. No additional accounts, no webhook setup, no "bridging" tools.

I migrated a 15-person team from Jenkins to GitLab CI last year. The productivity boost wasn't from faster builds — it was from eliminating context switching. Developers could trigger builds, check logs, and review code without leaving GitLab.

GitLab CI Strengths Details
Zero setup cost Already included with GitLab
Familiar interface Same UI as your repos and issues
Mature ecosystem 8+ years of enterprise battle-testing
Built-in registry Docker images, packages, all in one place

H2: Earthly — The Build Tool That Gets Docker Right

Earthly launched with a bold claim: "Docker builds, but better." After six months of production use, I'll say this — they weren't entirely wrong.

The core insight behind Earthly is that Dockerfile + CI YAML is a terrible developer experience. You write a Dockerfile, push to CI, wait 5 minutes, realize you forgot to install curl, repeat. Earthly lets you run the exact same build locally and in CI.

Here's what surprised me: Earthly's caching isn't just faster than GitLab CI's — it's smarter. It understands your dependency graph and can parallelize builds that GitLab CI runs sequentially.

Real example from our monorepo:

  • GitLab CI: Frontend build → Backend build → Integration tests (12 minutes total)
  • Earthly: All three run in parallel with shared base layers (7 minutes total)

The Earthfile syntax takes some getting used to if you're comfortable with Dockerfiles, but it's more powerful. You can define targets that depend on each other, share build contexts between services, and actually understand what's happening.

# Example Earthfile for a Node.js app
VERSION 0.7

deps:
    FROM node:18-alpine
    WORKDIR /app
    COPY package*.json ./
    RUN npm ci --only=production
    SAVE ARTIFACT node_modules /node_modules

build:
    FROM +deps
    COPY src ./src
    RUN npm run build
    SAVE ARTIFACT dist /dist AS LOCAL ./dist

test:
    FROM +deps
    COPY package*.json ./
    RUN npm ci
    COPY . .
    RUN npm test
Enter fullscreen mode Exit fullscreen mode

H2: Performance Benchmarks — The Numbers Don't Lie

I tested both tools on three different project types over two months:

Simple Node.js API (5 services):

  • GitLab CI: 3.2 minutes average
  • Earthly: 2.8 minutes average
  • Winner: Earthly (12% faster)

Complex microservices (12 services, shared libraries):

  • GitLab CI: 11.4 minutes average
  • Earthly: 6.8 minutes average
  • Winner: Earthly (40% faster)

Docker-heavy ML pipeline:

  • GitLab CI: 18.7 minutes average
  • Earthly: 11.2 minutes average
  • Winner: Earthly (60% faster)

The pattern is clear: the more complex your build, the bigger Earthly's advantage. For simple projects, the difference barely matters.

H2: Cost Analysis — Hidden Expenses Matter

GitLab CI pricing:

  • Free tier: 400 CI/CD minutes per month
  • Premium: $19/user/month (10,000 minutes included)
  • Ultimate: $99/user/month (50,000 minutes included)

Earthly pricing:

  • Open source: Free (unlimited local builds)
  • Earthly CI: $0.002 per build minute
  • Enterprise: Custom pricing

Here's the thing: GitLab's per-seat pricing can get expensive fast. A 10-person team on Premium costs $190/month even if only 3 people actively use CI.

Earthly's per-minute pricing scales with actual usage. Our team averaged $47/month on Earthly vs $190/month we'd pay for GitLab Premium.

But — and this is important — if you're already paying for GitLab Premium for other features, the CI is essentially free.

H2: Developer Experience — Where It Gets Interesting

GitLab CI pain points I've experienced:

  • Local debugging requires gitlab-runner (clunky setup)
  • YAML syntax errors aren't caught until pipeline runs
  • Limited visibility into what's actually happening inside Docker builds
  • Sharing pipeline templates between projects requires GitLab includes

Earthly advantages:

  • earthly +build runs locally exactly like CI
  • Better error messages with context
  • Visual build graph shows dependencies
  • Easier to share build logic between projects

The local development story is where Earthly really shines. I can't count how many times I've pushed "fix CI" commits because I couldn't reproduce the build environment locally.

With Earthly, if it works on your machine, it works in CI. Period.

H2: Integration Ecosystem Comparison

Feature GitLab CI Earthly
GitHub integration Limited Native
Slack notifications Via webhooks
Security scanning Built-in Third-party
Artifact storage Included External (S3, etc.)
Secret management GitLab Variables External (Vault, etc.)
Multi-cloud support Good Excellent

GitLab's strength is the integrated experience. Everything from planning to deployment lives in one place. Earthly's strength is flexibility — it works with whatever tools you're already using.

H2: Common Gotchas and Limitations

GitLab CI limitations:
❌ Docker-in-Docker can be finicky with complex builds
❌ Limited parallel job capabilities on free tier
❌ YAML complexity grows fast with sophisticated workflows
❌ Vendor lock-in if you use GitLab-specific features heavily

Earthly limitations:
❌ Smaller community and ecosystem
❌ Learning curve for teams comfortable with traditional CI
❌ Requires external solutions for notifications, security scanning
❌ Still relatively new (launched 2020)

The biggest Earthly gotcha: if your team is happy with simple Docker builds and basic CI workflows, it might be overkill. The learning investment isn't worth it unless you're actually hitting GitLab CI's limitations.

H2: Migration Considerations

Moving from GitLab CI to Earthly:
Time investment: 2-3 days for a typical project
Main challenge: Rewriting Docker builds as Earthfiles
Rollback difficulty: Easy (keep both temporarily)

Moving to GitLab CI from other tools:
Time investment: 1-2 days for basic setup
Main challenge: Learning GitLab's YAML syntax
Rollback difficulty: Medium (requires alternative Git hosting)

I've done both migrations. GitLab CI is easier to adopt quickly, but Earthly provides more long-term flexibility.

H2: Bottom Line

Choose Earthly if:

  • You have complex, multi-service builds
  • Local development speed matters to your team
  • You're using GitHub or want multi-platform flexibility
  • Build reproducibility is critical (regulated industries, etc.)

Choose GitLab CI if:

  • You're already using GitLab for source control
  • Your builds are relatively simple
  • You want integrated planning, CI, and deployment
  • Team size makes per-seat pricing reasonable

For most teams, this decision comes down to: are you optimizing for build speed or operational simplicity?

Personally, I use Earthly for my side projects where build performance matters, and GitLab CI for client work where predictability and integration matter more.

H2: Resources

— John Calloway writes about developer tools, AI, and building profitable side projects at Calloway.dev. Follow for weekly deep-dives.

{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"Is Earthly faster than GitLab CI?","acceptedAnswer":{"@type":"Answer","text":"Earthly is 12-60% faster than GitLab CI depending on build complexity. Simple projects see minimal difference, complex builds with multiple services show significant improvements."}},{"@type":"Question","name":"Which is cheaper: GitLab CI or Earthly?","acceptedAnswer":{"@type":"Answer","text":"Depends on usage. Earthly costs ~$0.002/minute, GitLab CI starts at $19/user/month. Small teams with heavy usage favor Earthly, larger teams with light usage favor GitLab."}},{"@type":"Question","name":"Can I run Earthly builds locally?","acceptedAnswer":{"@type":"Answer","text":"Yes, Earthly's main advantage is identical local and CI builds. Run 'earthly +build' locally to test exactly what runs in CI."}},{"@type":"Question","name":"Does Earthly work with GitHub?","acceptedAnswer":{"@type":"Answer","text":"Yes, Earthly integrates natively with GitHub Actions, GitLab CI, and most other CI platforms. It's platform-agnostic."}},{"@type":"Question","name":"Is GitLab CI good for Docker builds?","acceptedAnswer":{"@type":"Answer","text":"GitLab CI handles basic Docker builds well but struggles with complex multi-service builds. Docker-in-Docker can be problematic for advanced use cases."}}]}

Top comments (0)