GitLab

󰃭 2024-10-24

Setup GitLab runner with Podman

  1. Install GitLab Runner

  2. Create a new runner from the GitLab UI.

  3. Use the authentication token from the GitLab UI to register a new runner on the machine hosting the runner. Select the Docker executor.

sudo systemctl enable --now gitlab-runner.service
sudo gitlab-runner register --url https://git.hyperreal.coffee --token <TOKEN>
  1. Add the following lines to /etc/gitlab-runner/config.toml for Podman:
[[runners]]
    environment = ["FF_NETWORK_PER_BUILD=1"]
    [runners.docker]
        host = "unix://run/podman/podman.sock"
        tls_verify = false
        image = "git.hyperreal.coffee:5050/fedora-atomic/containers/fedora:latest"
        privileged = true
        volumes = ["/build-repo", "/cache", "/source-repo"]
  1. Restart the gitlab-runner:
sudo gitlab-runner restart

We should now be ready to use the Podman runner.


Enter your instance's address