So taking from the comments, the image is shown at start of build and for the curious around gitlab.com shared runners there's details on gitlab site for the saas_runners

For linux shared runners the default image at time of writing is ruby:3.1

For on premise (own runners), the default image is specified at time of registering the runner.

Answer from Tensibai on Stack Overflow
🌐
GitLab
docs.gitlab.com › runner › executors › docker
Docker executor | GitLab Docs
Configure the pull policy in the config.toml to define how runners pull Docker images from registries. You can set a single policy, a list of policies, or allow specific pull policies. ... always: Default. Pull an image even if a local image exists.
Discussions

GitLab Runner in Docker
I’d suggest setting up your runners using the docker executor - https://docs.gitlab.com/runner/executors/docker.html This allows your runner to start up fresh containers for jobs with the image you specify, meaning jobs aren’t running on the host and can have whatever you need. You can then also use a single runner with parallelism instead of multiple runners. Downside is that if you need to install extras they will need to install as part of the CI on every job. More on reddit.com
🌐 r/gitlab
6
3
August 31, 2023
How to create a custom Docker image and use it as a GitLab CI/CD Service? - Stack Overflow
I'm using CloudFoundry for deploying my services, and my E2E tests are done with Postman (Newman on CLI). The situation is that I do not have access directly to some services from my GitLab CI/CD, ... More on stackoverflow.com
🌐 stackoverflow.com
How GitLab CI works behind the scene.
https://docs.gitlab.com/ee/ci/ GitLab reads the .gitlab-ci.yml file on the branch that you pushed, or the default yaml defined by AutoDevOps if you have that enabled. The push triggers a pipeline, which creates jobs in stages. There are other potential triggers as well, for example scheduled jobs, API calls, or merge requests. You register a runner using a secret registration token generated in your project or group settings. The GitLab admins can also set up shared runners. If you’re using GitLab.com this is provided for you. The runner polls the GitLab API asking for jobs. When a pipeline creates jobs in step 2, runner(s) pick up the jobs and begin executing. You can have multiple runners so you can run jobs in parallel and have high availability. The runner evaluates all of the variables you have defined in project/group settings or the various overrides in variables: yaml and sets them as environment variables. For a script runner, it then simply executes your shell script. A docker runner creates a container using the image you specify and runs your shell script inside of it; a kubernetes runner runs a Pod (there is a little more complexity here as it has to create volumes and helper containers to get your data in and out). The advantage of a docker/kubernetes runner is the developer has total control over the build image and the tools installed and available for the build; also you get a clean and 100% reproducible build each time. With a shell runner, you have to install your build tools by hand; upgrading tools affects all projects/branches using that runner simultaneously; it’s easy to break something or have an unreproducible build. Unless you totally automate the runner set up (hurray, you just reinvented the wheel!) this makes script runners a liability. However, with docker/k8s runners you have to think about caching to speed up your builds since, as mentioned, you get a clean build directory each time. Usually, devs don’t have to think about any of this, it’s all happening behind the scenes. Your script (which can do whatever you want) creates the image just like you would on the command line on your PC, and pushes to a registry of your choice. If you use GitLab’s registry, the registry user/password are helpfully passed in as environment variables. There are some complexities if you’re using a docker/kubernetes runner as you might want to use a tool like Kaniko, Buildah, Jib Maven, Skaffold, etc. to build a docker image without docker (Otherwise in order to run “docker build” you’d need to run the docker runner in “privileged” mode to get docker-in-docker, which may be a security issue. This does work on GitLab.com, but in my organization privileged mode was not allowed.) If you are using AutoDevOps this is all done automatically. More on reddit.com
🌐 r/gitlab
3
6
January 7, 2021
gitlab pipeline default CI_BUILDS_DIR vs docker image
I think the /builds directory is shadowed by a volume mounted there. You can configure a custom builds_dir in the gitlab-runner config. https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runners-section More on reddit.com
🌐 r/gitlab
8
0
February 5, 2024
🌐
GitLab
gitlab.com › gitlab.org › gitlab-runner › #1577
default docker image for executor (#1577) · Issues · GitLab.org / gitlab-runner · GitLab
August 10, 2016 - Hi there, I am creating my first CI/CD pipelines and I currently have a really simple one. Locally I have installed a gitlab runner docker executor....
🌐
GitLab
about.gitlab.com › blog › gitlab-runner-with-docker
Setting up GitLab Runner For Continuous Integration
March 1, 2016 - We will add the docker tag to this runner since we can run any Docker image and services with it. ... Please enter the executor: virtualbox, ssh, shell, parallels, docker, docker-ssh: docker Please enter the default Docker image (eg.
🌐
GitLab
docs.gitlab.com › runner › install › docker
Run GitLab Runner in a container | GitLab Docs
For a FIPS compliant GitLab Runner image, based on redhat/ubi9-micro, use the gitlab/gitlab-runner:ubi-fips tags. Install trusted SSL server certificates. To use your local system for the configuration volume and other resources mounted into the gitlab-runner container: Optional. In MacOS systems, /srv does not exist by default. Create /private/srv, or another private directory, for setup. ... docker run -d --name gitlab-runner --restart always \ -v /srv/gitlab-runner/config:/etc/gitlab-runner \ -v /var/run/docker.sock:/var/run/docker.sock \ gitlab/gitlab-runner:latest
🌐
Reddit
reddit.com › r/gitlab › gitlab runner in docker
r/gitlab on Reddit: GitLab Runner in Docker
August 31, 2023 -

Hi all,

We recently moved to GitLab, and I am tasked with setting up the testing stuff for our pipeline.

We had gitlab runners recently installed on our server, but I am running into some problems. I’m new to all this, so while reading documentation has been helpful, I’m still unsure on a lot of things.

The Gitlab-Runner is installed and registered on 3 separate docker containers in the server (so 3 runners total)

The docker containers use the official docker alpine gitlab runner image

The Gitlab-Runner is in shell executor mode

When I run my script through gitlab-ci, I am getting command not found for sudo, apt, node, npm, docker, etc.

From what i can tell, that’s because the runner is running the CI script directly in the docker container from the official images, which do not have any of these installed.

So even if I switch from shell executor to docker executor, this would not work since the official runner image doesn’t have docker installed correct?

Is the correct path here to start docker containers with gitlab runners registered in it, but the docker container itself needs to be docker in docker? Is the official gitlab runner alpine image able to run in docker in docker?

🌐
GitLab
docs.gitlab.com › ci › docker › using_docker_images
Run your CI/CD jobs in Docker containers | GitLab Docs
However, you can configure the registry location in the gitlab-runner/config.toml file. For example, you can set the Docker pull policy to use local images. For more information about images and Docker Hub, see the Docker overview. Any image used to run a CI/CD job must have the following applications installed: ... You can define an image that’s used for all jobs, and a list of services that you want to use during runtime: default: image: ruby:2.6 services: - postgres:16.10 before_script: - bundle install test: script: - bundle exec rake spec
Find elsewhere
🌐
Docker Hub
hub.docker.com › r › gitlab › gitlab-runner
gitlab/gitlab-runner - Docker Image
gitlab/gitlab-runner:latest is image that can be used to run GitLab Runner in container. The complete usage guide can be found in the GitLab Runner Docs⁠
🌐
DEV Community
dev.to › mattdark › configure-your-own-gitlab-runner-4o34
Configure your own GitLab Runner - DEV Community
February 21, 2024 - In your GitLab repository, go to Settings --> CI/CD and expand the Runners section. From the Specific runners section, copy the registration token. Don't forget to disable Shared runners. ... Enter tags for the runner: Tags are comma separated and assign manually to jobs in your CI/CD pipelines. You can edit them later · Enter optional maintenance note for the runner. ... Enter the default Docker image: ruby:2.7...
🌐
University of Toronto
microfluidics.utoronto.ca › help › help
Using docker images · Docker · Ci · Help · GitLab
The runner starts a Docker container using the defined entrypoint. The default from Dockerfile that may be overridden in the .gitlab-ci.yml file.
🌐
GitLab
docs.gitlab.com › runner › register
Registering runners | GitLab Docs
Enter the type of executor. To register multiple runners on the same host machine, each with a different configuration, repeat the register command. You can also use the non-interactive mode to use additional arguments to register the runner: ... sudo gitlab-runner register \ --non-interactive \ --url "https://gitlab.com/" \ --registration-token "$PROJECT_REGISTRATION_TOKEN" \ --executor "docker" \ --docker-image ...
🌐
Medium
medium.com › @neha-saini › gitlab-runner-setup-build-docker-image-from-scratch-for-gitlabci-cd-pipeline-for-android-apps-da3ad39a0128
Installing GitLab Runner on Mac& Build Docker Image from Scratch for GitLab CI/CD | by Neha Saini | Medium
February 16, 2024 - To check the Docker image you just created androidbuildimage:1.0 , Container, and the build execution. Install the Docker desktop app and sign up on the Docker desktop. ... Now, You will have the runner up and running in Gitlab CI/CD runner settings.
🌐
Stack Overflow
stackoverflow.com › questions › 57396378 › how-to-create-a-custom-docker-image-and-use-it-as-a-gitlab-ci-cd-service
How to create a custom Docker image and use it as a GitLab CI/CD Service? - Stack Overflow
sudo gitlab-runner register Please ... enter the Docker image (eg. ruby:2.1): alpine:latest ... Gitlab-runner register needs you to specify a default docker image (in case you call the runner without specifying the image to use) ...
🌐
GitLab
mssg.ipta.demokritos.gr › gitlab › help › ci › docker › using_docker_images.md
Using docker images · Docker · Ci · Help · GitLab
Introduced in GitLab and GitLab Runner 9.4. Read more about the extended configuration options. Before showing the available entrypoint override methods, let's describe shortly how the Runner starts and uses a Docker image for the containers used in the CI jobs: The Runner starts a Docker container using the defined entrypoint (default from Dockerfile that may be overridden in .gitlab-ci.yml)
🌐
GitLab
docs.gitlab.com › ee › ci › docker › using_docker_build.html
Use Docker to build Docker images | GitLab Docs
May 8, 2023 - You do not need to include the docker:24.0.5-dind service, like you do when you use the Docker-in-Docker executor: default: image: docker:24.0.5-cli before_script: - docker info build: stage: build script: - docker build -t my-docker-image . - docker run my-docker-image /script/to/run/tests · For complex Docker-in-Docker setups like Code Quality scanning using CodeClimate, you must match host and container paths for proper execution. For more details, see Use private runners for CodeClimate-based scanning.
🌐
Medium
medium.com › @BuildWithLal › dockerized-gitlab-ci-register-docker-executor-as-a-gitlab-runner-71799352c9ac
Dockerized GitLab CI: Register Docker Executor as a GitLab Runner | by Lal Zada | Medium
October 10, 2024 - When asking for the GitLab instance URL, leave it as it is by hitting Enter unless your GitLab server and Runner are on different machines. Enter your favourite name for the Runner. Since we want to register a docker executor, enter docker when asking for executor option. When selecting docker executor, you also need to set a default docker image in case you miss it in our pipeline gitlab-ci.yml file when building pipeline for your project.
🌐
Medium
medium.com › pickme-engineering-blog › setting-up-a-gitlab-runner-using-docker-in-a-virtual-machine-fbf3d90d110e
Setting Up a GitLab Runner Using Docker in a Virtual Machine | by Dilshan Dilip Udara | The PickMe Engineering Blog | Medium
February 11, 2025 - Press enter or click to view image in full size · Run the following command to register the runner: docker run --rm -it \ -v /srv/gitlab-runner/config:/etc/gitlab-runner \ gitlab/gitlab-runner:latest register · GitLab instance URL: (Copy from ...