Installing Finch on Linux¶
Prerequisites¶
To get started with Finch on Linux, the development machine must meet the following prerequisites.
- Linux Kernel v4.x+
To determine the kernel version of your Linux machine, you can run the following command:
uname -r
So long as the first number is greater than 4, Finch is supported. The next sections will cover how to install Finch based on which Linux distribution you are using, along with generic installation options.
Amazon Linux¶
Finch is packaged in the standard Amazon Linux repositories. That means, installing Finch is as easy as installing any other Amazon Linux package:
$ sudo dnf install runfinch-finch
$ sudo amazon-linux-extras enable docker
$ sudo yum install runfinch-finch
After running this command, you will have a finch
program in your PATH, and you can navigate to the Verifying Finch install page to proceed. Navigate to the Optional Components page to configure Finch optional components.
Note that the all of the following Finch guides will use sudo finch ...
. There is an optional mechanism to avoid the use of sudo, follow the link for more information.
Generic¶
For distributions which do not have packages built for them, installing Finch requires downloading and installing dependencies, as well as creating filesystem paths needed by Finch.
Some distributions will distribute some of these packages themselves (for example, Fedora has a containerd
package), but this guide assumes that none of Finch's dependencies are available via package managers. If the dependencies are available and installed via package managers, some of these steps may be skipped.
The goal of these steps is to setup your system to mimic the configuration found in the finch.spec file in the runfinch/finch repository.
- Download the Finch Linux binary archive corresponding to your system's architecture from the Releases tab, and extract it using a command like
tar Cxzvvf /usr/local ./bin
- Download the Finch Daemon Linux binary archive corresponding to your system's architecture from their Releases tab, and extract it using a command like
tar Cxzvvf /usr/local/bin <archive_name> ./finch-daemon
- Download the latest nerdctl-full archive release corresponding to your system's architecture from their Releases tab, and extract it using a command like
tar Cxzvvf /usr/local <archive_name>
- Setup filesystem:
- Config:
sudo mkdir -p /etc/finch/nerdctl
sudo cp ./contrib/packaging/rpm/nerdctl.toml /etc/finch/nerdctl/
sudo mkdir -p /etc/finch/buildkit
sudo cp ./contrib/packaging/rpm/buildkitd.toml /etc/finch/buildkit/
- Runtime dependencies
sudo mkdir -p /usr/libexec/finch
sudo mkdir -p /var/lib/finch/buildkit
sudo mkdir -p /var/lib/finch/nerdctl
ln -sf /usr/local/bin/nerdctl /usr/libexec/finch/nerdctl
ln -sf /usr/local/bin/buildctl /usr/libexec/finch/buildctl
ln -sf /usr/local/bin/finch-daemon /usr/libexec/finch/finch-daemon
- Run system services using a service manager, like systemd, or directly. Example systemd service files can be found in the following locations:
- containerd
- buildkit
- finch-daemon
After completing this setup, you will have a finch
program in your PATH, and you can navigate to the Verifying Finch install page to proceed. Navigate to the Optional Components page to configure Finch optional components.
Note that the all of the following Finch guides will use sudo finch ...
. There is an optional mechanism to avoid the use of sudo, follow the link for more information.