GitLab
2024-10-24
Setup GitLab runner with Podman
Install GitLab Runner
Create a new runner from the GitLab UI.
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>
- 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"]
- Restart the gitlab-runner:
sudo gitlab-runner restart
We should now be ready to use the Podman runner.