Please refer to code-of-conduct.md for details.
To build Earthly from source, you need the same requirements as Earthly. We recommend that you use the pre-prelease version of Earthly for development purposes. To launch the pre-release Earthly, simply use the ./earthly
script provided in the root of the earthly repository. The pre-release Earthly tracks the version on main. You can use ./earthly --version
to identify which Git hash was used to build it.
To build Earthly from source for your target system, use
- Linux and WSL
./earthly +for-linux
- Mac
./earthly +for-darwin
This builds the earthly binary in ./build/<platform>/amd64/earthly
and also the buildkitd image.
The buildkitd image is tagged with your current branch name and also the built binary defaults to using that built image. The built binary will always check on startup whether it has the latest buildkitd running for its configured image name and will restart buildkitd automatically to update. If during your development you end up making changes to just the buildkitd image, the binary will pick up the change on its next run.
For development purposes, you may use the built earthly
binary to rebuild itself. It's usually faster than switching between the built binary and the prerelease binary because it avoids constant buildkitd restarts. After the first initial build, you'll end up using:
- Linux and WSL
./build/linux/amd64/earthly +for-linux
- Mac
./build/darwin/amd64/earthly +for-darwin
To run most tests you can issue
./build/<platform>/amd64/earthly -P +test
To also build the examples, you can run
./build/<platform>/amd64/earthly -P +test-all
If you have issues with git-related features or with private docker registries, make sure you have configured auth correctly. See the auth page for more details.
All contributions must indicate agreement to the Earthly Contributor License Agreement by logging into GitHub via the CLA assistant and signing the provided CLA. The CLA assistant will automatically notify the PRs that require CLA signing.
If you are an entity, please use the Earthly Contributor License Agreement form in addition to requiring your individual contributors to sign all contributions.