What is GitLab Runner?
GitLab Runner executes your CI/CD pipeline jobs either on a dedicated host outside your GitLab instance or on the same host as your GitLab instance. For CryptoHub code signing, you need a runner that can pull Docker images from public registries (i.e., Docker Hub and the Futurex public registry), then execute build and signing jobs in isolated containers. This ensures clean, reproducible builds and keeps your signing credentials off developer workstations. In this section, you install GitLab Runner on a Linux machine, register it with your GitLab project, and configure the Docker executor to handle both MinGW cross-compilation jobs and CryptoHub CLI signing jobs. Once complete, any pipeline run will automatically route build jobs (taggedmingw) and sign jobs (tagged codesign) to this runner.
Install Docker
Why: GitLab Runner’s Docker executor spawns ephemeral containers for each job. Without Docker, the runner cannot execute pipeline jobs. If Docker isn’t installed, add the official Docker repository and install:Bash
Bash
Install GitLab Runner
Add the GitLab Runner repository and install:Bash
Bash
Version 17.x.x (or newer)
Register the runner with your GitLab instance
Run the registration wizard:Bash
Configure Docker executor settings
Edit the runner configuration to optimize image handling and security:Bash
[[runners]] section for your newly registered runner. Add or modify the following under [runners.docker]:
None
pull_policy = ["if-not-present"]: Reuses cached images; reduces pull time from 30s to <1s after first runallowed_images = ["*"]: Permits any Docker image; lock this down in production (["openturns/*", "docker-registry.futurex.com/*"])volumes = ["/cache"]: Persists build artifacts between jobs (optional but recommended)
Ctrl+X, Y, Enter).
Configure Futurex Docker registry authentication
Create a Docker config for thegitlab-runner user:
Bash
/home/gitlab-runner/.docker/config.json, which the runner automatically uses.
Restart the runner service
Apply configuration changes:Bash
Bash
gitlab-runner: Service is running
Verify runner registration in GitLab UI
Result:You now have a working GitLab Runner that can:
- Pull images from Docker Hub (
openturns/archlinux-mingw) - Pull images from the Futurex registry (
docker-registry.futurex.com/kmes-cli:1.9.2-2) - Execute jobs tagged
mingw(build stage) orcodesign(sign stage)
mingw or codesign should start immediately (or within seconds).
Next steps
- Add the signing pipeline: Configure
.gitlab-ci.ymlto use themingwandcodesigntags (covered in the next section). - Lock down image access: In production, replace
allowed_images = ["*"]with an explicit allowlist. -Monitor runner logs: Watch for failures:sudo journalctl -u gitlab-runner -f

