docs/developer-setup.md
This document describes how to install and maintain a LinuxKit development platform. It will grow over time.
The LinuxKit team also maintains several Linux-based build platforms. These are donated by Equinix Metal (arm64) and IBM (s390x).
The amd64 and arm64 platforms are fully supported by most OS vendors and Docker. Just upgrade to the latest OS and install the latest Docker using the
packaging tools. As of this writing, that is:
aptyum. For any of these, use the CentOS 7/8 packages as released by Docker.Docker does not recommend that you using the packages released by the OS vendors, as those tend to be out of date. Follow the instructions from Docker.
The s390x has modern versions of most OSes, including RHEL and Ubuntu, but does not have recent versions of docker, neither as
apt packages for Ubuntu, nor as static downloads. In any case, these static downloads mostly are replicas.
This section describes how to install modern versions of Docker on these platforms.
RHEL 7 on s390x only has releases from Docker. Follow the instructions from Docker to install. The rpm packages for RHEL are available at https://download.docker.com/linux/rhel/
Docker does not release packages for Ubuntu on s390x. The most recent release was for Ubuntu 18.04 Bionic, with Docker version 18.06.3. This is quite old, and does not support modern capabilities, e.g. buildkit.
To install a more modern version:
apt upgradedo-release-upgrade -d. Note that you can set which versions to suggest via changing /etc/update-manager/release-upgradescontainerd.io-*.rpmdocker-ce-*.rpmdocker-ce-cli-*.rpmapt install alienalien --scripts <source-rpm-file.rpm>dpkg -i <source-dpkg>.dpkg. Dependency management is not great, so we recommend installing them in order:
containerd.iodocker-cedocker-ce-cliapt install libdevmapper-devldd /usr/bin/dockerd. In our example, it needs libdevmapper.so.1.02cd /lib/s390x-linux-gnu/ && ln -s $(ls -1 libdevmapper.so.*) libdevmapper.so.1.02ldd /usr/bin/dockerdsystem ctl restart dockerdocker versiondocker run --rm hello-worldOn all platforms, if you want to run tests, you will need:
jqexpectqemu-kvmThese should be installed using your normal platform package installation, e.g. apt install -y jq expect qemu-kvm.
You also will need rtf, which can be installed with make bin/rtf && make install.
For pushing our kernels, you will need manifest-tool, which can be installed with
make bin/manifest-tool && make install.
Finally, to enable your regular user to run the tools, we recommend:
usermod -aG docker $USER
usermod -aG kvm $USER
usermod -aG sudo $USER