Why Earthly?
With Earthly, all builds are containerized, consistent, and language
agnostic.

Before:

Flaky
Clunky and Brittle
Build guru required
With Earthly:

Reproducible
Robust
Easy to Understand
Write once, run anywhere: Your laptop, remote, or any CI
Super-simple, Super-powerful
It's like Dockerfile and Makefile had a baby ❤️
It's like Dockerfile and Makefile had a baby ❤️
Earthly was engineered for readability. Most engineers are able to read
an Earthfile without any prior knowledge. We took some of the best ideas
from Dockerfiles and Makefiles and combined them into one specification.
Benefits
Instantly familiar syntax
Democratized builds that don't rely on a build guru
Repeatable builds that run the same anywhere
Built-in caching for more speed
FROM golang:1.13-alpine3.11
RUN apk --update --no-cache add git
WORKDIR /go-example
all:
BUILD +build
BUILD +lint
build:
COPY main.go .
RUN go build -o build/go-example main.go
SAVE ARTIFACT
build/go-example AS LOCAL
build/go-example
lint:
RUN go get golang.org/x/lint/golint
COPY main.go .
RUN golint -set_exit_status ./...
Easily reproduce CI failures
Earthly builds are self-contained, isolated and repeatable. Regardless
of whether Earthly runs in your CI or on your laptop, the build will run
the same way. This allows for faster iteration and easier debugging.
Unlock your team's full productivity by eliminating
"works on my machine but not in CI" blockers. No more
git commit -m "try again"
.
Developer friendly like a build system, versatile like a CI
Parallel by default 🚀
Whenever possible, Earthly automatically executes targets in parallel
and makes maximum use of cache. Earthly also has powerful shared caching
capabilities, to speed up builds in sandboxed environments, such as
GitHub Actions.
If your build has independent steps, Earthly will:
Build a directed acyclic graph (DAG)
Isolate execution of each step
Run independent steps in parallel
Cache results for future use
FROM golang:1.13-alpine3.11
WORKDIR /proto-example
proto:
FROM
namely/protoc-all:1.29_4
COPY api.proto /defs
RUN --entrypoint -- -f api.proto -l go
SAVE ARTIFACT ./gen/pb-go /pb
AS LOCAL pb
build:
COPY go.mod go.sum .
RUN go mod download
COPY +proto/pb pb
COPY main.go ./
RUN go build -o build/proto-example
main.go
SAVE ARTIFACT
build/proto-example
Repeatable builds that work everywhere:
Local, Remote, or CI
Local, Remote, or CI
When the environment is decoupled from the build execution, the
possibilities are endless. Run the build locally, close to where you
make edits to your code, or run the build on a remote cloud worker
for maximum performance, or run the same build in the CI of your choice.
No need to configure language-specific tooling, install additional
dependencies, or ensure that the build scripts are compatible with your
OS. Earthly gives you consistent, repeatable builds regardless of where
the execution takes place. The world is your oyster. 🦪
Works with the build tools you know and love 🔨
Unlike some opinionated build systems, Earthly allows you to use the
compiler and build tooling specific to your programming language of
choice. You don't need to completely rewrite your builds, nor replace
your
package.json
, go.mod
,
build.gradle
, or your Cargo.toml
. You can use
Earthly as a wrapper around your existing tooling, and benefit from
repeatable builds effortlessly.
IMPORT github.com/earthly/multirepo-static:main AS static
IMPORT github.com/earthly/multirepo-js:main AS js
FROM node:13.10.1-alpine3.11
WORKDIR /example-multirepo
docker:
RUN npm install -g http-server
COPY static+html/* ./
COPY js+build/* ./
EXPOSE 8080
ENTRYPOINT ["http-server", "."]
SAVE IMAGE --push earthly/examples:multirepo
Reuse, don't repeat ♻️
Reference builds, recipes, images and artifacts from another build in a
single line. Earthly is cache-aware, based on the Git commit hash of the
referenced repository. Combined with shared caching, you can create vast
and efficient build hierarchies that only execute steps impacted by your
changes. Earthly builds are performant in either monorepo or polyrepo
setups and do not suffer from bloated context transfer issues specific
to some Dockerfile setups.
Strong Community
Open projects benefit from a collaborative community. Earthly encourages
contributions.
8000+
Stars
1650+
Commits
265+
Forks
65+
Contributors
Want to see the source? Found an issue? Have an idea for a feature or
contribution?
Head over to our GitHub repo.
Endorsements
Matt Klein
Creator of Envoy Proxy
"
Earthly is a pragmatic and incremental solution to a thorny problem
that all organizations face. I'm extremely excited about Earthly
bringing this functionality to existing container based build systems
without requiring an extremely expensive retooling effort on top of
something like Bazel.
Envoy is an open source edge and service proxy, designed for
cloud-native applications.
Florian Leibert
Founder of D2iQ
"
Large organizations like Google or Twitter have solved these problems
internally in a way that is idiosyncratic to their engineering
processes. Earthly is the first solution to bring the power of
repeatable builds at scale to market in a packaging that can fit all
organizations.
D2iQ (formerly Mesosphere) simplifies enterprise Kubernetes in
production at scale.
Spencer Kimball
Creator of Cockroach DB
"
By reducing the friction inherent in build tools, Earthly is enabling
SaaS companies to move quickly and reduce the context switching
overhead in their engineering organizations.
Cockroach Labs are the creators of Cockroach DB
Have Questions?
Join
our Slack channel
. We are on there Monday through Friday and happy to answer questions.
You may also want to visit our
Frequently Asked Questions
to learn more.