Docker runner image configuration logic not fully documented
Docker runner image configuration is poorly documented
Runners with the Docker executor can have their Docker image specified in both config.toml
(image
parameter in the [runners.docker] section) and .gitlab-ci.yml
(image
keyword). The relationship between these configuration parameters is not explained.
Potential confusions
Here are some understandings that I have held at one point or another.
It's fine as long as the image is configured in either configuration file. This turned out not to be true, since it is impossible to register a Docker runner without specifying an image. (Why is that?)
If I specify an image in .gitlab-ci.yml
, then only runners with that image will pick up the job. I now believe this is incorrect and in fact even non-docker runners (e.g. runners with the shell executor) can pick up the job. In fact, most of the documentation states that only the scope (instance/group/project) and tags of a runner are considered in the job-to-runner assignment.
Proposal
Both of the previous use cases would, I think, constitute a sensible logic. If the implemented logic is "the config.toml
image is ignored if one is specified in .gitlab-ci.yml
and through tags one must make sure that a docker runner gets the job," than this is weird enough to deserve explicit documentation.
Who can address the issue
Anyone that has a definitive understanding of what is going on could document this interplay. I suggest to link to it from both the config.toml
page and the .gitlab-ci.yml
reference.