Skip to content

Instantly share code, notes, and snippets.

@ravihara
Last active September 6, 2022 14:24
Show Gist options
  • Save ravihara/624b64eb63c1664bfb2fd58b3f3fe52c to your computer and use it in GitHub Desktop.
Save ravihara/624b64eb63c1664bfb2fd58b3f3fe52c to your computer and use it in GitHub Desktop.
Setup apt repository for Earthly on Debian systems
#!/bin/bash
keyring_file="/etc/apt/keyrings/earthly-repo.gpg"
echo -e "Installing dependencies for earthly..."
sudo apt update -qq
sudo apt install -y apt-transport-https ca-certificates curl gnupg lsb-release
echo -e "\nConfiguring earthly apt repo..."
curl -fsSL https://pkg.earthly.dev/earthly.pgp | sudo gpg --dearmor -o ${keyring_file}
echo -e "deb [arch=amd64 signed-by=${keyring_file}] https://pkg.earthly.dev/deb stable main" | sudo tee /etc/apt/sources.list.d/earthly.list >/dev/null
echo -e "\nInstalling earthly..."
sudo apt update -qq
sudo apt install -qq -y earthly
echo -e "All done."
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment