Gitlab-ci.yml scripts don't run on a provided image, but on GitLab Runner container

SCENARIO
In my before_script I print hostname, pwd, python -V. It’s done to understand where this script runs on.

PROBLEM
I see that it runs on gitlab-runner container, instead of provided image.

Versions

  • GitLab 12.6.0
  • Runner version v12.9.1
  • Docker as executor

gitlab-ci.yml
image:
name: “image_name:tag”
entrypoint: [""]

before_script:
    - hostname
    - pwd
    - python -V
...
...

Registration cmd
docker run --rm -it --name dv_test_gitlab_runner -v /srv/gitlab-runner/config:/etc/gitlab-runner -v /srv/certs/filename.cer:/srv/certs/filename.cer /docker/gitlab/gitlab-runner:ubuntu-v12.9.1 register --tls-ca-file="/srv/certs/filenameCA.cer" --url https://OUR_URL --registration-token OUR_TOKEN

Run cmd
docker run --restart always -it -v /var/run/docker.sock:/var/run/docker.sock -v /srv/gitlab-runner/config:/etc/gitlab-runner -v /srv/certs/filename.cer:/srv/certs/filename.cer OUR_URL/docker/gitlab/gitlab-runner:ubuntu-v12.9.1 run