Fast, consistent builds with an instantly familiar syntax – like Dockerfile and Makefile had a baby.
With Earthfiles, all builds are self-contained, consistent, portable, and language agnostic.
Build at the speed of light with an instantly available cache
VERSION 0.8
FROM golang:1.21-alpine3.19
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 install golang.org/x/lint/golint@latest
COPY main.go .
RUN golint -set_exit_status ./...
Simple, Fast, Consistent Builds