Self-hosted runner fails to run on macOS

Describe your question in as much detail as possible:

I installed Gitlab Runner on a Mac with docker executor, but when I start queuing jobs on the runner, it always fails at container creation.

  • What are you seeing, and how does that differ from what you expect to see?

    I expect the job to run normally, like how it does on my other linux runners and shared runners.

  • Consider including screenshots, error messages, and/or other helpful visuals

    It fails with the following error message.

    ERROR: Preparation failed: adding cache volume: set volume permissions: create 
    permission container for volume "runner-tu7-vzrm-project-[redacted]-concurrent-0-cache-[redacted]": Error response from daemon: invalid reference format (linux_set.go:95:0s)
    
  • What version are you on? Are you using self-managed or GitLab.com?

    • GitLab (Hint: /help):
    • Runner (Hint: /admin/runners):
    • macOS: Monterey 12.6
  • Add the CI configuration from .gitlab-ci.yml and other configuration if relevant (e.g. docker-compose.yml)

    I am using node:16 as the build image.

  • What troubleshooting steps have you already taken? Can you link to any docs or other resources so we know where you have been?

    No related troubleshooting steps for my error in the docs:
    Install GitLab Runner on macOS | GitLab

    1. I tried setting disable_cache = true and volumes = [], this skips cache volume creation, but build volume also fails with the same error.
    2. I tried enabling privileged mode, still having the same error.

Thanks for taking the time to be thorough in your request, it really helps! :blush: