Prepare the Runner

When using self-hosted runners, you are responsible for patching the operating system and installing all the software required to build the application. In this learning path, you use the .NET SDK and Docker. Therefore, you need to install these components.

For Ubuntu 22.04, the Docker installation process is as follows:

  1. Open the Terminal and type the following commands:

            # Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg lsb-release
sudo mkdir -p /etc/apt/keyrings
sudo curl -fsSL -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
  $(lsb_release -cs) stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

sudo apt-get install docker-ce docker-ce-cli docker-buildx-plugin docker-compose-plugin
  1. Create the docker group and add your user to it:

            sudo groupadd docker
sudo usermod -aG docker $USER
  1. Restart the machine, then verify that Docker is working by running the following command in the Terminal:

            docker run hello-world

To install the .NET SDK:

  1. Open the terminal and enter:

            wget -O
chmod +x ./
./ --version latest
  1. This will generate output similar to the following:

        dotnet-install: Attempting to download using link
dotnet-install: Remote file size is 221512731 bytes.
dotnet-install: Extracting zip from
dotnet-install: Downloaded file size is 221512731 bytes.
dotnet-install: The remote and local file sizes are equal.
dotnet-install: Installed version is 8.0.203
dotnet-install: Adding to current process PATH: `/home/parallels/.dotnet`. Note: This change will be visible only when sourcing script.
dotnet-install: Note that the script does not resolve dependencies during installation.
dotnet-install: To check the list of dependencies, go to, select your operating system and check the "Dependencies" section.
dotnet-install: Installation finished successfully.

  1. Configure the environment variables for the .NET SDK to ensure the dotnet command is in your PATH: Configure environment variables:

            echo 'export DOTNET_ROOT=$HOME/.dotnet' >> ~/.profile
echo 'export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools' >> ~/.profile
source ~/.profile

The VM is ready, and you can associate it with GitHub.