You can run GitLab in a container in Docker-desktop on Windows. Follow this link. Once GitLab is running in a container and accessible using a link like http://localhost, now GitLab-runner can be run in another container in Docker-desktop and register it with GitLab to execute your pipeline.
–> Create Docker named volume
–> Start the GitLab-runner by mounting the docker volume created earlier-
–> Register the runner with GitLab-
Before running the below command to register the runner, keep this information handy-
- Find GitLab instance URL– Use this command
to find the GitLab container IP first (NOT the gitlab-runner container) in Docker-desktop. The the GitLab instance URL will be http://<Container IP>:80
- Get the Registration Token– Login to GitLab using root user and go to Menu–>Admin, copy the token
Provide the following information for the prompts-
If registration is successful, it will prompt for runner executor with options, select “shell” or any other executor you want.
Once the runner is registered, it will show up under Runners in GitLab as shown-
You can watch – https://www.youtube.com/watch?v=JLdPiq0owUM