How are the commands defined in a CI job pushed to Docker container

Hi all,

I’m not able to understand how the scripts defined for a CI job are passed down to the docker container where the scripts should be executed.

imagine this CI job:

  stage: docker_tests
    - cmd1 --param 1 --param 2
    - cmd2 --param 1 --param 2

I do believe there must be some wrapper script being passed down to the container.

I imagine somewhere along the road, some docker run <image> <COMMAND> is executed. but how does <COMMAND> look like?

I’m using GL 12.8.8ee

Any hint is highly appreciated.