Running Gitlab on Local with Gitlab Runner

November 22, 2021

Install GitLab Runner

Install using Homebrew:

brew install gitlab-runner

Start GitLab Runner service:

brew services start gitlab-runner

Configure Docker Registry Access

Add credentials to /Users/muhyusuf/.docker/config.json for private registry access:

{
    "auths": {
        "registry.gitlab.com": {
            "username": "iambbb",
            "password": "password"
        }
    },
    "credsStore": "desktop",
    "experimental": "disabled", 
    "stackOrchestrator": "swarm",
    "currentContext": "default"
}

Run Specific Pipeline Stage

Execute specific stage (e.g., unit_test):

sudo gitlab-runner exec docker unit_test

Reference:

#GitLab #Docker #CI-CD #Runner