Alternative installation

Alternative Installation

This page outlines alternative installation instructions for the earthly build tool. The main instructions that most users need are available on the installation instructions page.

Prerequisites

Install earthly

Download the binary relevant to your platform from the releases page, rename it to earthly and place it in your bin.
To initialize the installation, including adding auto-completion for your shell, run
1
sudo earthly bootstrap --with-autocomplete
Copied!
and then restart your shell.

CI

For instructions on how to install earthly for CI use, see the CI integration guide.

Installing from Earthly repositories (experimental)

Important
Our rpm and deb repositories are currently in Experimental stage.
    The repository may break, be changed drastically with no warning, or be removed altogether.
    Check the GitHub tracking issue for any known problems.
    Give us feedback on Slack.
Earthly can be installed for Debian and RedHat based Linux distributions via the Earthly deb and rpm repositories.
All of our binaries are signed with our PGP key; which has the fingerprint:
1
5816 B221 3DD1 CEB6 1FC9 52BA B118 5ECA 33F8 EB64
Copied!
Debian-based repositories (including Ubuntu)
Debian-based Linux users (e.g. Debian, Ubuntu, Mint, etc) can use our apt repo to install Earthly.
Before installing Earthly, you must first set up the Earthly apt repo.
    1.
    Update apt and install required tools to support https-based apt repos:
    1
    sudo apt-get update
    2
    sudo apt-get install \
    3
    apt-transport-https \
    4
    ca-certificates \
    5
    curl \
    6
    gnupg \
    7
    lsb-release
    Copied!
    2.
    Download Earthly's GPG key:
    1
    curl -fsSL https://pkg.earthly.dev/earthly.pgp | sudo gpg --dearmor -o /usr/share/keyrings/earthly-archive-keyring.gpg
    Copied!
    3.
    Setup the stable repo:
    1
    echo \
    2
    "deb [arch=amd64 signed-by=/usr/share/keyrings/earthly-archive-keyring.gpg] https://pkg.earthly.dev/deb \
    3
    stable main" | sudo tee /etc/apt/sources.list.d/earthly.list > /dev/null
    Copied!
    4.
    Install Earthly:
    1
    sudo apt-get update
    2
    sudo apt-get install earthly
    Copied!
Fedora repositories
Fedora users can use our rpm repo to install Earthly.
    1.
    Install plugins required to manage DNF repositories:
    1
    sudo dnf -y install dnf-plugins-core
    Copied!
    2.
    Add the Earthly repo to your system:
    1
    sudo dnf config-manager \
    2
    --add-repo \
    3
    https://pkg.earthly.dev/earthly.repo
    Copied!
    3.
    Install Earthly:
    1
    sudo dnf install earthly
    Copied!
CentOS repositories
CentOS users can use our rpm repo to install Earthly.
    1.
    Install utils required to manage yum repositories:
    1
    sudo yum install -y yum-utils
    Copied!
    2.
    Add the Earthly repo to your system:
    1
    sudo yum-config-manager \
    2
    --add-repo \
    3
    https://pkg.earthly.dev/earthly.repo
    Copied!
    3.
    Install Earthly:
    1
    sudo yum install earthly
    Copied!

Native Windows

Important
Our native Windows release is currently in the Experimental stage.
    The release ships with known issues. Many things work, but some don't.
    Check the GitHub tracking issue for any known problems.
    Give us feedback on Slack.
To install the Windows release, simply download the binary (or from our release page); and ensure it is within your PATH.
To add earthly.exe to your PATH environment variable:
    1.
    Search and select: System (Control Panel)
    2.
    Click the Advanced system settings link.
    3.
    Click Environment Variables. In the "System Variables" section, select the PATH environment variable and click Edit.
      If the PATH environment variable does not exist, click New.
    4.
    In the Edit window, specify the value of the PATH environment variable, and Click OK.
    5.
    Close and reopen any existing terminal windows, so they will pick up the new PATH.
If you are going to mostly be working from a WSL2 prompt in Windows, you might want to consider following the Linux instructions for installation. This will help prevent any cross-subsystem file transfers and keep your builds fast. Note that the "original" WSL is unsupported.

Installing from source

To install from source, see the contributing page.

Configuration

If you use SSH-based git authentication, then your git credentials will just work with Earthly. Read more about git auth.
For a full list of configuration options, see the Configuration reference​

Verify installation

To verify that the installation works correctly, you can issue a simple build of an existing hello-world project
1
earthly github.com/earthly/hello-world:main+hello
Copied!
You should see the output
1
github.com/earthly/hello-world:main+hello | --> RUN [echo 'Hello, world!']
2
github.com/earthly/hello-world:main+hello | Hello, world!
3
github.com/earthly/hello-world:main+hello | Target github.com/earthly/hello-world:main+hello built successfully
4
=========================== SUCCESS ===========================
Copied!

Uninstall

To remove earthly, run the following commands:

macOS users

1
brew uninstall earthly
2
rm -rf ~/.earthly
3
docker rm --force earthly-buildkitd
4
docker volume rm --force earthly-cache
Copied!

Linux and WSL2 users

1
rm /usr/local/bin/earthly
2
rm /usr/share/bash-completion/completions/earthly
3
rm /usr/local/share/zsh/site-functions/_earthly
4
rm -rf ~/.earthly
5
docker rm --force earthly-buildkitd
6
docker volume rm --force earthly-cache
Copied!
Last modified 18d ago