Confused between image property of the Runner and image property in gitlab-ci.yml

Can someone clarify the meaning and difference between the image property in the runner config (config.toml) and the image property in a step of gitlab-ci.yml.

Given the configuration for 2 runners below and my gitlab-ci job, what will happen when runner 1 or runner 2 pick up this job? Will they use the image that was defined for them or will they use the image defined for the job?

config.toml - runner 1

...
  [runners.docker]
    ...
    image = "node:12.18.4-alpine"
    ...

config.toml - runner 2

...
[runners.docker]
    ...
    image = "docker:19.03.12"
    ...

gitlab-ci.yml

build:
        stage: build
        image: node:12.18.4-alpine
        script:
            - npm install
            - npm run build

Hi @pmarcoen
the image property in config.toml is a default image that is used in case none is specified in .gitlab-ci.yml.

1 Like

Hi @balonik, ok so if I always define an image in my gitlab-ci.yml file this property does not matter.
Thank you!

1 Like